-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
355 changed files
with
30,805 additions
and
2,551 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -9,8 +9,14 @@ jobs: | |
chart-update: | ||
name: Cromwhelm Chart Auto Updater | ||
if: github.event.pull_request.merged == true | ||
runs-on: self-hosted # Faster machines; see https://github.com/broadinstitute/cromwell/settings/actions/runners | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch Jira ID from the commit message | ||
id: fetch-jira-id | ||
run: | | ||
JIRA_ID=$(echo '${{ github.event.pull_request.title }}' | grep -Eo '[A-Z][A-Z]+-[0-9]+' | xargs echo -n | tr '[:space:]' ',') | ||
[[ -z "$JIRA_ID" ]] && { echo "No Jira ID found in $1" ; exit 1; } | ||
echo "JIRA_ID=$JIRA_ID" >> $GITHUB_OUTPUT | ||
- name: Clone Cromwell | ||
uses: actions/checkout@v2 | ||
with: | ||
|
@@ -49,6 +55,7 @@ jobs: | |
username: dsdejenkins | ||
password: ${{ secrets.DSDEJENKINS_PASSWORD }} | ||
# Build & push `cromwell`, `womtool`, `cromiam`, and `cromwell-drs-localizer` | ||
# This step is validated in the GHA 'docker_build_test.yml' without the accompanying docker push | ||
- name: Build Cromwell Docker | ||
run: | | ||
set -e | ||
|
@@ -68,18 +75,61 @@ jobs: | |
repository: broadinstitute/terra-helmfile | ||
event-type: update-service | ||
client-payload: '{"service": "cromiam", "version": "${{ env.CROMWELL_VERSION }}", "dev_only": false}' | ||
- name: Edit & push chart | ||
- name: Edit & push cromwhelm chart | ||
env: | ||
BROADBOT_GITHUB_TOKEN: ${{ secrets.BROADBOT_GITHUB_TOKEN }} | ||
run: | | ||
set -e | ||
cd cromwhelm | ||
git checkout main | ||
ls -la | ||
sed -i "s/appVersion.*/appVersion: \"$CROMWELL_VERSION\"/" cromwell-helm/Chart.yaml | ||
sed -i "s/image: broadinstitute\/cromwell.*/image: broadinstitute\/cromwell:$CROMWELL_VERSION/" cromwell-helm/templates/cromwell.yaml | ||
sed -i "s|image: broadinstitute/cromwell:.*|image: broadinstitute/cromwell:$CROMWELL_VERSION|" terra-batch-libchart/values.yaml | ||
git diff | ||
git config --global user.name "broadbot" | ||
git config --global user.email "[email protected]" | ||
git commit -am "Auto update to Cromwell $CROMWELL_VERSION" | ||
git commit -am "${{ steps.fetch-jira-id.outputs.JIRA_ID }}: Auto update to Cromwell $CROMWELL_VERSION" | ||
git push https://broadbot:[email protected]/broadinstitute/cromwhelm.git main | ||
cd - | ||
- name: Clone terra-helmfile | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: broadinstitute/terra-helmfile | ||
token: ${{ secrets.BROADBOT_GITHUB_TOKEN }} # Has to be set at checkout AND later when pushing to work | ||
path: terra-helmfile | ||
|
||
- name: Update workflows-app in terra-helmfile | ||
run: | | ||
set -e | ||
cd terra-helmfile | ||
sed -i "s|image: broadinstitute/cromwell:.*|image: broadinstitute/cromwell:$CROMWELL_VERSION|" charts/workflows-app/values.yaml | ||
cd - | ||
- name: Update cromwell-runner-app in terra-helmfile | ||
run: | | ||
set -e | ||
cd terra-helmfile | ||
sed -i "s|image: broadinstitute/cromwell:.*|image: broadinstitute/cromwell:$CROMWELL_VERSION|" charts/cromwell-runner-app/values.yaml | ||
cd - | ||
- name: Make PR in terra-helmfile | ||
env: | ||
BROADBOT_TOKEN: ${{ secrets.BROADBOT_GITHUB_TOKEN }} | ||
GH_TOKEN: ${{ secrets.BROADBOT_GITHUB_TOKEN }} | ||
run: | | ||
set -e | ||
JIRA_ID=${{ steps.fetch-jira-id.outputs.JIRA_ID }} | ||
if [[ $JIRA_ID == "missing" ]]; then | ||
echo "JIRA_ID missing, PR to terra-helmfile will not be created" | ||
exit 0; | ||
fi | ||
cd terra-helmfile | ||
git checkout -b ${JIRA_ID}-cromwell-update-$CROMWELL_VERSION | ||
git config --global user.name "broadbot" | ||
git config --global user.email "[email protected]" | ||
git commit -am "${JIRA_ID}: Auto update Cromwell to $CROMWELL_VERSION in workflows-app and cromwell-runner-app" | ||
git push -u origin ${JIRA_ID}-cromwell-update-$CROMWELL_VERSION | ||
gh pr create --title "${JIRA_ID}: auto update Cromwell version to $CROMWELL_VERSION in workflows-app and cromwell-runner-app" --body "${JIRA_ID} helm chart update" --label "automerge" | ||
cd - |
Oops, something went wrong.