-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrelease_args.sh
More file actions
executable file
·33 lines (26 loc) · 1.47 KB
/
release_args.sh
File metadata and controls
executable file
·33 lines (26 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/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
./.bin/yq -i ".controllerManager.image.tag = \"${newReleaseVersion}\"" "${valuesYAML}"
./.bin/yq -i ".values.images.doguOperator |= sub(\":(([0-9]+)\.([0-9]+)\.([0-9]+)((?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))|(?:\+[0-9A-Za-z-]+))?)\", \":${newReleaseVersion}\")" "${componentPatchTplYAML}"
local chownInitImage
chownInitImage=$(./.bin/yq ".additionalImages.chownInitImage" "${valuesYAML}")
./.bin/yq -i ".values.images.chownInitImage = \"${chownInitImage}\"" "${componentPatchTplYAML}"
local exporterImage
exporterImage=$(./.bin/yq ".additionalImages.exporterImage" "${valuesYAML}")
./.bin/yq -i ".values.images.exporterImage = \"${exporterImage}\"" "${componentPatchTplYAML}"
local doguAdditionalMountsInitContainerImage
doguAdditionalMountsInitContainerImage=$(./.bin/yq ".additionalImages.additionalMountsInitContainerImage" "${valuesYAML}")
./.bin/yq -i ".values.images.additionalMountsInitContainerImage = \"${doguAdditionalMountsInitContainerImage}\"" "${componentPatchTplYAML}"
}
update_versions_stage_modified_files() {
valuesYAML=k8s/helm/values.yaml
componentPatchTplYAML=k8s/helm/component-patch-tpl.yaml
git add "${valuesYAML}" "${componentPatchTplYAML}"
}