This commit is contained in:
2024-04-25 15:51:35 +02:00
parent e7abe46547
commit cde389e56b

View File

@@ -35,15 +35,16 @@ spec:
workingDir: $(workspaces.source.path)
script: |
#!/usr/bin/env bash
git config --global --add safe.directory /workspace/source
ts=`date "+%Y%m%d-%H%M%S"`
t2=`date "+%Y%m%d.%H%M%S"`
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 -ne "\nCommit Count: "
echo -n ${cc} | tee $(results.commitcount.path)
echo -n "Build ID: "
echo -ne "\nBuild ID: "
echo -n ${buildId} | tee $(results.build-id.path)
workspaces:
- name: source