-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Align helm tasks and pipelines for new config approach (#47)
* Update helm tasks * Update parameter definition * Update default versioning for helm tasks Change-Id: Ic5f1fac20fe3935502fbf6f587325e56d159f82a
- Loading branch information
Mykola Serdiuk
committed
Oct 19, 2023
1 parent
2341c18
commit d515fec
Showing
20 changed files
with
175 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersionHelm.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: get-version-helm-default | ||
spec: | ||
description: | ||
workspaces: | ||
- name: source | ||
description: The workspace consisting of csharp project. | ||
params: | ||
- name: BRANCH_NAME | ||
type: string | ||
description: Codebasebranch name | ||
- name: chart-dir | ||
type: string | ||
results: | ||
- name: VERSION | ||
description: "Application version" | ||
- name: VCS_TAG | ||
description: "VCS tag" | ||
- name: IS_TAG | ||
description: "CodebaseImageStream tag" | ||
steps: | ||
- name: get-version | ||
image: linuxserver/yq | ||
env: | ||
- name: BRANCH_NAME | ||
value: "$(params.BRANCH_NAME)" | ||
- name: CHART_DIR | ||
value: "$(params.chart-dir)" | ||
workingDir: $(workspaces.source.path) | ||
script: | | ||
set -e | ||
BUILD_VERSION=$(grep -m 1 -oE 'version:[[:space:]]*[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)*' ${CHART_DIR}/Chart.yaml | awk '{print $2}') | ||
BUILD_VERSION=$(cat ${CHART_DIR}/Chart.yaml | yq -r ".version") | ||
VCS_TAG="${BRANCH_NAME}-${BUILD_VERSION}" | ||
IS_TAG="${BUILD_VERSION}" | ||
echo "VCS tag - ${VCS_TAG}" | ||
echo "IS tag - ${IS_TAG}" | ||
echo "VERSION tag - ${BUILD_VERSION}" | ||
printf "%s" "${VCS_TAG}" > "$(results.VCS_TAG.path)" | ||
printf "%s" "${BUILD_VERSION}" > "$(results.VERSION.path)" | ||
printf "%s" "${IS_TAG}" > "$(results.IS_TAG.path)" |
Oops, something went wrong.