fix
This commit is contained in:
@@ -30,28 +30,19 @@ spec:
|
|||||||
- name: build-id
|
- name: build-id
|
||||||
description: Current commitcount
|
description: Current commitcount
|
||||||
steps:
|
steps:
|
||||||
- name: get-timestamp
|
- name: get-build-id
|
||||||
image: $(params.toolbox-image)
|
|
||||||
script: |
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
ts=`date "+%Y%m%d-%H%M%S"`
|
|
||||||
echo -n "Current Timestamp: "
|
|
||||||
echo -n ${ts} | tee $(results.timestamp.path)
|
|
||||||
- name: get-commitcount
|
|
||||||
image: $(params.toolbox-image)
|
image: $(params.toolbox-image)
|
||||||
workingDir: $(workspaces.source.path)
|
workingDir: $(workspaces.source.path)
|
||||||
script: |
|
script: |
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
ts=`date "+%Y%m%d-%H%M%S"`
|
||||||
|
t2=`date "+%Y%m%d.%H%M%S"`
|
||||||
cc=`git rev-list --count HEAD`
|
cc=`git rev-list --count HEAD`
|
||||||
|
buildId="$(params.branch)-${cc}.${t2}"
|
||||||
|
echo -n "Current Timestamp: "
|
||||||
|
echo -n ${ts} | tee $(results.timestamp.path)
|
||||||
echo -n "Commit Count: "
|
echo -n "Commit Count: "
|
||||||
echo -n ${cc} | tee $(results.commitcount.path)
|
echo -n ${cc} | tee $(results.commitcount.path)
|
||||||
- name: get-build-id
|
|
||||||
image: $(params.toolbox-image)
|
|
||||||
script: |
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
ts=`cat $(results.timestamp.path)|sed 's/-/./`
|
|
||||||
cc=`cat $(results.commitcount.path)`
|
|
||||||
buildId="$(params.branch)-${cc}.${ts}"
|
|
||||||
echo -n "Build ID: "
|
echo -n "Build ID: "
|
||||||
echo -n ${buildId} | tee $(results.build-id.path)
|
echo -n ${buildId} | tee $(results.build-id.path)
|
||||||
workspaces:
|
workspaces:
|
||||||
|
|||||||
Reference in New Issue
Block a user