Skip to content

Commit

Permalink
#9 Update versions in release process.
Browse files Browse the repository at this point in the history
  • Loading branch information
nhinze23 committed Dec 5, 2023
1 parent ab06c53 commit d5dcd2c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
10 changes: 10 additions & 0 deletions k8s/helm/component-patch-tpl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
values:
images:
job: cloudogu/k8s-host-change:0.3.0
patches:
values.yaml:
job:
image:
repository: "{{ registryFrom .images.backup-operator }}/{{ repositoryFrom .images.backup-operator }}"
tag: "{{ tagFrom .images.backup-operator }}"
21 changes: 21 additions & 0 deletions release_args.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail

# this function will be sourced from release.sh and be called from release_functions.sh
update_versions_modify_files() {
newReleaseVersion="${1}"
valuesYAML=k8s/helm/values.yaml
componentPatchTplYAML=k8s/helm/component-patch-tpl.yaml

yq -i ".job.image.tag = \"${newReleaseVersion}\"" "${valuesYAML}"
yq -i ".values.images.job = \"cloudogu/k8s-host-change:${newReleaseVersion}\" " "${componentPatchTplYAML}"
}

update_versions_stage_modified_files() {
valuesYAML=k8s/helm/values.yaml
componentPatchTplYAML=k8s/helm/component-patch-tpl.yaml

git add "${valuesYAML} ${componentPatchTplYAML}"
}

0 comments on commit d5dcd2c

Please sign in to comment.