Skip to content

Commit

Permalink
adding automatic version bumps (#749)
Browse files Browse the repository at this point in the history
* adding automatic version bumps

* lint fixes

* lint fixes
  • Loading branch information
johndietz authored Aug 27, 2024
1 parent ebc49a9 commit 516d7fa
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 7 deletions.
47 changes: 41 additions & 6 deletions .argo/publish-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}}'

Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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"
2 changes: 1 addition & 1 deletion charts/kubefirst-docs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ appVersion: 31a0cb9
description: Kubefirst documentation Helm chart
name: kubefirst-docs
type: application
version: 1.145.0
version: 1.146.0

0 comments on commit 516d7fa

Please sign in to comment.