-
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.
feat: Add quality gate for chart name alignment with codebase name(#191)
- Loading branch information
oleksandr_taruraiev
committed
May 15, 2024
1 parent
3fd3120
commit 93f593b
Showing
11 changed files
with
238 additions
and
58 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
37 changes: 37 additions & 0 deletions
37
charts/pipelines-library/templates/tasks/check-helm-chart-name.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,37 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: check-helm-chart-name | ||
namespace: edp-delivery-ot-dev | ||
spec: | ||
params: | ||
- name: codebase_name | ||
type: string | ||
- name: chart_dir | ||
description: The directory in source that contains the helm chart | ||
default: "." | ||
steps: | ||
- name: check-helm-chart-name | ||
env: | ||
- name: CODEBASE_NAME | ||
value: $(params.codebase_name) | ||
- name: CHART_DIR | ||
value: $(params.chart_dir) | ||
image: alpine:3.18.6 | ||
script: | | ||
#!/bin/sh | ||
# Extract the chart name from the Chart.yaml | ||
CHART_NAME=$(awk '/^name:/ {print $2}' ${CHART_DIR}/Chart.yaml) | ||
# Compare with CODEBASE_NAME | ||
if [ "$CHART_NAME" == "$CODEBASE_NAME" ]; then | ||
echo "The name in Chart.yaml matches the CODEBASE_NAME." | ||
else | ||
echo "The name in Chart.yaml does not match the CODEBASE_NAME." | ||
exit 1 | ||
fi | ||
workingDir: $(workspaces.source.path) | ||
workspaces: | ||
- description: A workspace that contains fetched git repo. | ||
name: source |
Oops, something went wrong.