Datarepo api version update: 1.562.0 #899
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 chart Datarepo chart | |
on: | |
workflow_dispatch: | |
inputs: | |
notify-slack: | |
default: true | |
type: boolean | |
workflow_call: | |
inputs: | |
notify-slack: | |
default: false | |
type: boolean | |
push: | |
branches: | |
- master | |
paths: | |
- '!charts/**' | |
- '!.github/**' | |
- '!README.md' | |
- 'charts/datarepo-api/**' | |
- 'charts/datarepo-ui/**' | |
- 'charts/create-secret-manager-secret/**' | |
- 'charts/gcloud-sqlproxy/**' | |
- 'charts/oidc-proxy/**' | |
- 'charts/gcp-managed-cert/**' | |
- 'charts/de-elasticsearch/**' | |
jobs: | |
release_new_umbrella_dr: | |
runs-on: ubuntu-latest | |
outputs: | |
new-version: ${{ steps.new-chart.outputs.version }} | |
parent-chart-version: ${{ steps.parent-chart.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: true | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
token: "${{ secrets.BROADBOT_TOKEN }}" #otherwise merge will fail | |
ref: master | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: add repo | |
run: | | |
helm repo add datarepo-helm https://broadinstitute.github.io/datarepo-helm | |
helm repo add stable https://charts.helm.sh/stable | |
helm repo add elastic https://helm.elastic.co | |
helm repo add terra-helm https://terra-helm.storage.googleapis.com | |
helm repo update | |
- name: Run chart-releaser | |
uses: helm/[email protected] | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
CR_SKIP_EXISTING: "true" | |
- name: Pause between chart release and creation of new umbrella chart | |
id: wait | |
run: | | |
sleep 30 | |
- name: "Get current umbrella chart version" | |
id: parent-chart | |
uses: mikefarah/[email protected] | |
with: | |
cmd: echo "version=$(yq '.version' charts/datarepo/Chart.yaml)" >> $GITHUB_OUTPUT | |
- name: "Create new umbrella chart" | |
uses: broadinstitute/[email protected] | |
# This step expects the previous datarepo-umbrella-release-action to | |
# edit the code downloaded in Checkout step on the runner filesystem | |
# and bump the umbrella chart version. So while parent-step code is identical | |
# new-chart will resolve to an updated chart version. | |
- name: "Get new umbrella chart version" | |
id: new-chart | |
uses: mikefarah/[email protected] | |
with: | |
cmd: echo "version=$(yq '.version' charts/datarepo/Chart.yaml)" >> $GITHUB_OUTPUT | |
- name: "[datarepo-helm] Merge in changes to umbrella chart" | |
uses: broadinstitute/datarepo-actions/actions/[email protected] | |
env: | |
COMMIT_MESSAGE: "Datarepo umbrella chart update" | |
GITHUB_REPO: datarepo-helm | |
MERGE_BRANCH: master | |
- name: "Notify Slack" | |
if: ${{ (github.event_name == 'push' && always()) || (inputs.notify-slack && always()) }} # workflow_call has own slack notification | |
uses: broadinstitute/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
MATRIX_CONTEXT: ${{ toJson(matrix) }} # required to work with job field | |
with: | |
status: ${{ job.status }} | |
fields: job,repo,message | |
channel: "#jade-spam" | |
username: "datarepo-helm actions" | |
text: "Create Datarepo Chart" | |
report-chart-to-sherlock: | |
name: Report Chart Version to DevOps | |
needs: [release_new_umbrella_dr] | |
uses: broadinstitute/sherlock/.github/workflows/client-report-chart-version.yaml@main | |
with: | |
new-version: ${{ needs.release_new_umbrella_dr.outputs.new-version }} | |
parent-chart-version: ${{ needs.release_new_umbrella_dr.outputs.parent-chart-version }} | |
chart-name: datarepo | |
permissions: | |
contents: read | |
id-token: write | |
set-chart-version-in-dev: | |
name: Set Chart Version in Dev | |
uses: broadinstitute/sherlock/.github/workflows/client-set-environment-chart-version.yaml@main | |
needs: | |
- release_new_umbrella_dr | |
- report-chart-to-sherlock | |
with: | |
new-version: ${{ needs.release_new_umbrella_dr.outputs.new-version }} | |
chart-name: datarepo | |
environment-name: dev | |
secrets: | |
sync-git-token: ${{ secrets.BROADBOT_TOKEN }} | |
permissions: | |
id-token: write |