Make celery worker dockerfiles work on OpenShift #95
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/checkout@v4.1.7 | |
- name: Pull flux_river_configs | |
uses: actions/checkout@v4.1.7 | |
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/checkout@v4.1.7 | |
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 flux_river_configs | |
uses: mikefarah/yq@v4.44.2 | |
with: | |
cmd: | | |
yq -i '.spec.chart.spec.version = strenv(RELEASE_VERSION) | .spec.chart.spec.version style="double" ' flux_river_configs/servicex-int/values.yaml && | |
yq -i '.appVersion = strenv(RELEASE_VERSION) | .appVersion style="double" | .version = "'$RELEASE_VERSION'"| .version style="double" ' helm/servicex/Chart.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 | |
- 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/github-action-push-to-another-repository@v1.7.2 | |
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: 'bengal1@illinois.edu' | |
- name: Pushes to flux-river-configs repository | |
uses: cpina/github-action-push-to-another-repository@v1.7.2 | |
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: 'bengal1@illinois.edu' | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2.0.8 | |
with: | |
tag_name: ${{ github.ref }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false |