From ee152837d40c73be3589f4ae9bc79ab0a1455c6c Mon Sep 17 00:00:00 2001 From: Pedro Maximino Date: Wed, 28 Aug 2024 12:06:05 +0200 Subject: [PATCH] ci: Update charts CI to include the new swan-cern-system chart This is to bump the chart version automatically, through the CI, everytime there are changes. --- .github/workflows/check-charts.yaml | 2 ++ .github/workflows/list-changed-charts.sh | 2 +- .github/workflows/release-charts.yaml | 23 +++++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-charts.yaml b/.github/workflows/check-charts.yaml index 45d29a22..c3446f24 100644 --- a/.github/workflows/check-charts.yaml +++ b/.github/workflows/check-charts.yaml @@ -29,3 +29,5 @@ jobs: - run: helm dependency update swan && helm lint swan && helm package swan - run: helm dependency update swan-cern && helm lint swan-cern && helm package swan-cern + + - run: helm dependency update swan-cern-system && helm lint swan-cern-system && helm package swan-cern-system diff --git a/.github/workflows/list-changed-charts.sh b/.github/workflows/list-changed-charts.sh index 81789677..b99c28f7 100755 --- a/.github/workflows/list-changed-charts.sh +++ b/.github/workflows/list-changed-charts.sh @@ -6,7 +6,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" || exit; pwd;)" cd "${script_dir}/../../" # cd to the root of the repo -CHARTS=("swan" "swan-cern") +CHARTS=("swan" "swan-cern" "swan-cern-system") for CHART_NAME in "${CHARTS[@]}"; do diff --git a/.github/workflows/release-charts.yaml b/.github/workflows/release-charts.yaml index bea87a1a..f1f14e63 100644 --- a/.github/workflows/release-charts.yaml +++ b/.github/workflows/release-charts.yaml @@ -42,6 +42,16 @@ on: - minor - patch + bump_swan_cern_system: + description: "Bump version for swan-cern-system/" + required: false + default: patch + type: choice + options: + - major + - minor + - patch + jobs: check_branch: runs-on: ubuntu-latest @@ -59,6 +69,7 @@ jobs: outputs: swan_has_changed: ${{ steps.diff.outputs.swan_has_changed }} swan-cern_has_changed: ${{ steps.diff.outputs.swan-cern_has_changed }} + swan-cern-system_has_changed: ${{ steps.diff.outputs.swan-cern-system_has_changed }} steps: - name: Checkout repository uses: actions/checkout@v3 @@ -135,3 +146,15 @@ jobs: WORKFLOW_ACCESS_TOKEN: ${{ secrets.WORKFLOW_ACCESS_TOKEN }} HELM_REPO_USERNAME: ${{ secrets.HELM_REPO_USERNAME }} HELM_REPO_PASSWORD: ${{ secrets.HELM_REPO_PASSWORD }} + + tag_swan_cern_system: + needs: [check_charts, list_changed_charts] + if: needs.list_changed_charts.outputs.swan-cern-system_has_changed == 'true' + uses: ./.github/workflows/tag-chart.yaml + with: + chart: swan-cern-system + bump: ${{ inputs.bump_swan_cern_system }} + secrets: + WORKFLOW_ACCESS_TOKEN: ${{ secrets.WORKFLOW_ACCESS_TOKEN }} + HELM_REPO_USERNAME: ${{ secrets.HELM_REPO_USERNAME }} + HELM_REPO_PASSWORD: ${{ secrets.HELM_REPO_PASSWORD }} \ No newline at end of file