CHANGELOG for 1.6 #110
Workflow file for this run
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
name: Create and Publish Helm Packages | |
on: | |
push: | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10, will be triggered when a new tag is pushed | |
jobs: | |
call-ci-servicex: | |
uses: ./.github/workflows/ci_servicex.yaml | |
secrets: inherit | |
call-ci-helm-tests: | |
uses: ./.github/workflows/ci_helm_tests.yaml | |
secrets: inherit | |
build: | |
name: Create Release | |
needs: [call-ci-servicex, call-ci-helm-tests] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Pull flux_river_configs | |
uses: actions/[email protected] | |
with: | |
repository: ssl-hep/flux_river_configs | |
ref: main | |
path: flux_river_configs | |
token: ${{ secrets.API_TOKEN_GITHUB }} | |
- name: Pull ssl-helm-charts | |
uses: actions/[email protected] | |
with: | |
repository: ssl-hep/ssl-helm-charts | |
ref: gh-pages | |
path: ssl-helm-charts | |
token: ${{ secrets.API_TOKEN_GITHUB }} | |
- name: Create release version env var | |
run: | | |
# Remove leading v from version string | |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" | sed s/v// >> $GITHUB_ENV | |
echo "$RELEASE_VERSION" | |
echo "DOCKER_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
echo "$DOCKER_TAG" | |
- 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: | | |
# 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" | | |
.transformer.sidecarTag = strenv(DOCKER_TAG) | .transformer.sidecarTag style="double" | | |
.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: | |
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | |
with: | |
source-directory: 'ssl-helm-charts' | |
destination-github-username: 'ssl-hep' | |
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: | |
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | |
with: | |
source-directory: 'flux_river_configs' | |
destination-github-username: 'ssl-hep' | |
destination-repository-name: 'flux_river_configs' | |
target-branch: 'main' | |
user-email: '[email protected]' | |
- name: Create Release | |
id: create_release | |
uses: softprops/[email protected] | |
with: | |
tag_name: ${{ github.ref }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false |