Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
THWiseman committed Oct 2, 2023
2 parents f34251c + fc9e3cc commit 559c191
Show file tree
Hide file tree
Showing 355 changed files with 30,805 additions and 2,551 deletions.
174 changes: 0 additions & 174 deletions .circleci/config.yml

This file was deleted.

60 changes: 55 additions & 5 deletions .github/workflows/chart_update_on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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 -
Loading

0 comments on commit 559c191

Please sign in to comment.