This commit is contained in:
2024-04-25 15:44:19 +02:00
parent 61ab8e5afd
commit 1c9a9ee26b
2 changed files with 7 additions and 3 deletions

View File

@@ -39,6 +39,7 @@ spec:
echo -n ${ts} | tee $(results.timestamp.path)
- name: get-commitcount
image: $(params.toolbox-image)
workingDir: $(workspaces.source.path)
script: |
#!/usr/bin/env bash
cc=`git rev-list --count HEAD`
@@ -52,4 +53,7 @@ spec:
cc=`cat $(results.commitcount.path)`
buildId="$(params.branch)-${cc}.${ts}"
echo -n "Build ID: "
echo -n ${buildId} | tee $(results.build-id.path)
echo -n ${buildId} | tee $(results.build-id.path)
workspaces:
- name: source
description: A workspace that contains the fetched git repository to create a version for.

View File

@@ -238,7 +238,7 @@ data:
imageRepositoryRef:
name: ${PROJECT_NAME}-repo
filterTags:
pattern: '^v(?P<semver>(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)'
pattern: '^v(?P<semver>.*)$'
extract: '$semver'
policy:
semver:
@@ -256,7 +256,7 @@ data:
imageRepositoryRef:
name: ${PROJECT_NAME}-repo
filterTags:
pattern: '^main-(?P<semver>(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)'
pattern: '^main-(?P<semver>.*)$'
extract: '$semver'
policy:
semver: