From 516d7faf95d8f1c6a1a2d7f8e292fc0849d56054 Mon Sep 17 00:00:00 2001 From: John Dietz Date: Mon, 26 Aug 2024 22:09:58 -0400 Subject: [PATCH] adding automatic version bumps (#749) * adding automatic version bumps * lint fixes * lint fixes --- .argo/publish-and-release.yaml | 47 ++++++++++++++++++++++++++++---- charts/kubefirst-docs/Chart.yaml | 2 +- 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/.argo/publish-and-release.yaml b/.argo/publish-and-release.yaml index 341265d1..b335553c 100644 --- a/.argo/publish-and-release.yaml +++ b/.argo/publish-and-release.yaml @@ -39,7 +39,7 @@ spec: - name: gitUrlNoProtocol value: '{{workflow.parameters.gitUrlNoProtocol}}' - - - name: get-initial-micro-chart-version + - - name: get-initial-chart-version templateRef: name: cwft-helm-v2 template: get-chart-version @@ -69,7 +69,7 @@ spec: - name: chartDir value: 'charts/{{workflow.parameters.appName}}' - name: chartVersion - value: '{{steps.get-initial-micro-chart-version.outputs.result}}' + value: '{{steps.get-initial-chart-version.outputs.result}}' - name: shortSha value: '{{workflow.parameters.shortSha}}' @@ -103,7 +103,7 @@ spec: - name: appName value: '{{workflow.parameters.appName}}' - name: tagName - value: '{{steps.get-initial-micro-chart-version.outputs.result}}' + value: '{{steps.get-initial-chart-version.outputs.result}}' - - name: set-environment-version templateRef: @@ -118,11 +118,11 @@ spec: - name: fullChartPath value: '{{workflow.parameters.gitopsDestinationFile}}' - name: chartVersion - value: '{{steps.get-initial-micro-chart-version.outputs.result}}' + value: '{{steps.get-initial-chart-version.outputs.result}}' - name: environment value: '{{workflow.parameters.environment}}' - - - name: commit-micro-chart-increment + - - name: commit-to-gitops templateRef: name: cwft-git-v2 template: pull-commit-sign-push @@ -142,4 +142,39 @@ spec: # github skip ci rule: https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs # gitlab skip ci rule: https://devops.stackexchange.com/questions/6809/is-there-a-ci-skip-option-in-gitlab-ci # in case, the rule is disbaled or don't work this step will create a circular trigger of builds and bumps of version. - value: "[skip ci] [CI SKIP] setting {{workflow.parameters.appName}} {{workflow.parameters.environment}} to chart version '{{steps.get-initial-micro-chart-version.outputs.result}}'\n\nskip-checks:true" + value: "[skip ci] [CI SKIP] setting {{workflow.parameters.appName}} {{workflow.parameters.environment}} to chart version '{{steps.get-initial-chart-version.outputs.result}}'\n\nskip-checks:true" + + - - name: increment-chart-minor + templateRef: + name: cwft-helm-v2 + template: increment-chart-minor + clusterScope: true + arguments: + artifacts: + spec: + - name: chartDir + value: 'charts/{{workflow.parameters.appName}}' + - name: chartVersion + value: '{{steps.get-initial-chart-version.outputs.result}}' + + - - name: commit-to-app-repo + templateRef: + name: cwft-git-v2 + template: pull-commit-sign-push + clusterScope: true + arguments: + artifacts: + - name: repo-source + from: '{{steps.set-environment-version.outputs.artifacts.repo-source}}' + parameters: + - name: repoName + value: '{{workflow.parameters.appName}}' + - name: gitUrlNoProtocol + value: '{{workflow.parameters.gitUrlNoProtocol}}' + - name: commitMessage + # Please, be careful updating this message, it must comply with: + # github skip ci rule: https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/ + # github skip ci rule: https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs + # gitlab skip ci rule: https://devops.stackexchange.com/questions/6809/is-there-a-ci-skip-option-in-gitlab-ci + # in case, the rule is disbaled or don't work this step will create a circular trigger of builds and bumps of version. + value: "[skip ci] [CI SKIP] bumping chart after release'\n\nskip-checks:true" diff --git a/charts/kubefirst-docs/Chart.yaml b/charts/kubefirst-docs/Chart.yaml index d1df949b..68b672fc 100644 --- a/charts/kubefirst-docs/Chart.yaml +++ b/charts/kubefirst-docs/Chart.yaml @@ -3,4 +3,4 @@ appVersion: 31a0cb9 description: Kubefirst documentation Helm chart name: kubefirst-docs type: application -version: 1.145.0 +version: 1.146.0