-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #853 from ssl-hep/fix_helm_tags
Update the chart's values.yaml to use released images
- Loading branch information
Showing
1 changed file
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,25 +40,42 @@ jobs: | |
echo "DOCKER_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
echo "$DOCKER_TAG" | ||
- name: Set version in flux_river_configs | ||
- name: Set version in helm values.yaml | ||
# Update the tags for images in the helm Chart.yaml and values.yaml to match | ||
# The deployed docker image tag | ||
uses: mikefarah/[email protected] | ||
with: | ||
cmd: | | ||
yq -i '.spec.chart.spec.version = strenv(RELEASE_VERSION) | .spec.chart.spec.version style="double" ' flux_river_configs/servicex-int/values.yaml && | ||
# Update the version of the helm chart | ||
yq -i '.appVersion = strenv(RELEASE_VERSION) | .appVersion style="double" | .version = "'$RELEASE_VERSION'"| .version style="double" ' helm/servicex/Chart.yaml && | ||
# Update the tags for the well known images in the helm values.yaml | ||
yq -i '.app.tag = strenv(DOCKER_TAG) | .app.tag style="double" | | ||
.didFinder.rucio.tag = strenv(DOCKER_TAG) | .didFinder.rucio.tag style="double" | | ||
.didFinder.CERNOpenData.tag = strenv(DOCKER_TAG) | .didFinder.CERNOpenData.tag style="double" | | ||
.transformer.sidecarTag = strenv(DOCKER_TAG) | .transformer.sidecarTag style="double" | | ||
.x509Secrets.tag = strenv(DOCKER_TAG) | .x509Secrets.tag style="double" ' helm/servicex/Chart.yaml && | ||
CODEGENS=$(yq '.spec.values.codeGen | keys | .[]' flux_river_configs/servicex-int/values.yaml) && for i in $CODEGENS; do yq -i '.spec.values.codeGen.[$i].tag=strenv(DOCKER_TAG) | .spec.values.codeGen.[$i].tag style="double"' flux_river_configs/servicex-int/values.yaml; done | ||
.minioCleanup.tag = strenv(DOCKER_TAG) | .minioCleanup.tag style="double" | | ||
.x509Secrets.tag = strenv(DOCKER_TAG) | .x509Secrets.tag style="double" ' helm/servicex/values.yaml && | ||
# Loop over each of the DID Finders to update the tags for each | ||
DIDFINDERS=$(yq '.didFinder | keys | .[]' helm/servicex/values.yaml) && | ||
for i in $DIDFINDERS; do yq -i '.didFinder.[$i].tag=strenv(DOCKER_TAG) | .didFinder.[$i].tag style="double"' helm/servicex/values.yaml; done && | ||
# Loop over each of the Codegens to update the tags for each | ||
CODEGENS=$(yq '.codeGen | keys | .[]' helm/servicex/values.yaml) && | ||
for i in $CODEGENS; do yq -i '.codeGen.[$i].tag=strenv(DOCKER_TAG) | .codeGen.[$i].tag style="double"' helm/servicex/values.yaml; done | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: v3.9.2 | ||
|
||
- name: Create helm package | ||
working-directory: ./helm | ||
run: | | ||
helm dependency update servicex | ||
helm package servicex | ||
mv servicex-$RELEASE_VERSION.tgz ../ssl-helm-charts | ||
helm repo index ../ssl-helm-charts --url https://ssl-hep.github.io/ssl-helm-charts/ | ||
- name: Pushes to ssl-helm-packages repository | ||
uses: cpina/[email protected] | ||
env: | ||
|
@@ -69,6 +86,14 @@ jobs: | |
destination-repository-name: 'ssl-helm-charts' | ||
target-branch: 'gh-pages' | ||
user-email: '[email protected]' | ||
|
||
- name: Set version in flux_river_config for the production environment | ||
uses: mikefarah/[email protected] | ||
with: | ||
cmd: | | ||
# Update the chart version to pick up | ||
yq -i '.spec.chart.spec.version = strenv(RELEASE_VERSION) | .spec.chart.spec.version style="double" ' flux_river_configs/servicex-prod/values.yaml | ||
- name: Pushes to flux-river-configs repository | ||
uses: cpina/[email protected] | ||
env: | ||
|
@@ -79,6 +104,7 @@ jobs: | |
destination-repository-name: 'flux_river_configs' | ||
target-branch: 'main' | ||
user-email: '[email protected]' | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: softprops/[email protected] | ||
|