Skip to content

Commit

Permalink
Merge pull request #34 from RedHatInsights/konflux_xyz_branch_tags
Browse files Browse the repository at this point in the history
Adding minor release tagging, i.e. tagging x.y for an x.y.z release.
  • Loading branch information
abellotti authored Nov 8, 2024
2 parents 125398a + c611e88 commit e38a6a0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .tekton/rhproxy-engine-container-release-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ spec:
taskSpec:
results:
- name: target_release
description: Target Release Tag build
description: Target Patch Release Tag build (x.y.z)
- name: release_build
description: Boolean if the Target Release is an x.y.z Release Build
description: Boolean if the Target Release is an x.y.z Patch Release Build
- name: minor_release
description: Minor Release Tag build (x.y)
steps:
- name: init-env
image: ubuntu
Expand All @@ -157,15 +159,22 @@ spec:
# The following variables are required because on-cel-expression
# string matches do not currently support regular expression.
#
# TARGET_RELEASE is the Patch Release (x.y.z)
# RELEASE_BUILD is a true|false Boolean if we have a Patch Release
# MINOR_RELEASE is the Minor Release (x.y)
TARGET_RELEASE=$(echo -n "{{target_branch}}" | cut -f3 -d/)
echo "TARGET_RELEASE=${TARGET_RELEASE}"
echo -n "${TARGET_RELEASE}" > "$(results.target_release.path)"
RELEASE_BUILD="false"
MINOR_RELEASE=""
if [[ "${TARGET_RELEASE}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
RELEASE_BUILD="true"
MINOR_RELEASE="${TARGET_RELEASE%.[0-9]*}"
fi
echo "RELEASE_BUILD=${RELEASE_BUILD}"
echo -n "${RELEASE_BUILD}" > "$(results.release_build.path)"
echo "MINOR_RELEASE=${MINOR_RELEASE}"
echo -n "${MINOR_RELEASE}" > "$(results.minor_release.path)"
runAfter:
- init
- name: clone-repository
Expand Down Expand Up @@ -450,7 +459,7 @@ spec:
- name: IMAGE
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: ADDITIONAL_TAGS
value: ["$(tasks.init-env.results.target_release)"]
value: ["$(tasks.init-env.results.target_release)", "$(tasks.init-env.results.minor_release)"]
runAfter:
- build-image-index
taskRef:
Expand Down

0 comments on commit e38a6a0

Please sign in to comment.