forked from broadinstitute/cromwell
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from henriqueribeiro/cromwell-83
Cromwell 83
- Loading branch information
Showing
571 changed files
with
4,970 additions
and
9,864 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
*.MD text | ||
*.java text | ||
*.html text | ||
docs/api/RESTAPI.md linguist-generated=true |
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
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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: chart-update-on-merge | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
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 | ||
steps: | ||
- name: Clone Cromwell | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: broadinstitute/cromwell | ||
token: ${{ secrets.BROADBOT_GITHUB_TOKEN }} # Has to be set at checkout AND later when pushing to work | ||
path: cromwell | ||
- uses: olafurpg/setup-scala@v10 | ||
with: | ||
java-version: adopt@1.11 | ||
- name: Clone Cromwhelm | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: broadinstitute/cromwhelm | ||
token: ${{ secrets.BROADBOT_GITHUB_TOKEN }} # Has to be set at checkout AND later when pushing to work | ||
path: cromwhelm | ||
- name: Find Cromwell short SHA | ||
run: | | ||
set -e | ||
cd cromwell | ||
echo "CROMWELL_SHORT_SHA=`git rev-parse --short $GITHUB_SHA`" >> $GITHUB_ENV | ||
- name: Find Cromwell release number | ||
run: | | ||
set -e | ||
previous_version=$(curl -X GET https://api.github.com/repos/broadinstitute/cromwell/releases/latest | jq .tag_name | xargs) | ||
if ! [[ "${previous_version}" =~ ^[0-9][0-9]+$ ]]; then | ||
exit 1 | ||
fi | ||
echo "CROMWELL_NUMBER=$((previous_version + 1))" >> $GITHUB_ENV | ||
- name: Save complete image ID | ||
run: | | ||
echo "CROMWELL_SNAP_VERSION=`echo "$CROMWELL_NUMBER-$CROMWELL_SHORT_SHA-SNAP"`" >> $GITHUB_ENV | ||
# `DSDEJENKINS_PASSWORD` auto syncs from vault with https://github.com/broadinstitute/terraform-ap-deployments/pull/614 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: dsdejenkins | ||
password: ${{ secrets.DSDEJENKINS_PASSWORD }} | ||
- name: Build Cromwell Docker | ||
run: | | ||
set -e | ||
cd cromwell | ||
sbt server/docker | ||
docker push broadinstitute/cromwell:$CROMWELL_SNAP_VERSION | ||
- name: Edit & push 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_SNAP_VERSION\"/" cromwell-helm/Chart.yaml | ||
sed -i "s/image: broadinstitute\/cromwell.*/image: broadinstitute\/cromwell:$CROMWELL_SNAP_VERSION/" cromwell-helm/templates/cromwell.yaml | ||
git diff | ||
git config --global user.name "broadbot" | ||
git config --global user.email "broadbot@broadinstitute.org" | ||
git commit -am "Auto update to Cromwell $CROMWELL_SNAP_VERSION" | ||
git push https://broadbot:$BROADBOT_GITHUB_TOKEN@github.com/broadinstitute/cromwhelm.git main |
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Make publish PRs | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
old_cromwell_version: | ||
description: 'What version of Cromwell to update from' | ||
required: true | ||
new_cromwell_version: | ||
description: 'What version of Cromwell to update to' | ||
required: true | ||
jira_ticket: | ||
description: 'The JIRA ticket to link the update PR to' | ||
required: true | ||
|
||
jobs: | ||
make-firecloud-develop-pr: | ||
name: Create firecloud-develop PR | ||
runs-on: self-hosted # Faster machines; see https://github.com/broadinstitute/cromwell/settings/actions/runners | ||
steps: | ||
- name: Clone firecloud-develop | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: broadinstitute/firecloud-develop | ||
token: ${{ secrets.BROADBOT_GITHUB_TOKEN }} # Has to be set at checkout AND later when pushing to work | ||
path: firecloud-develop | ||
- name: Update & push to firecloud-develop | ||
id: update-and-push | ||
env: | ||
BROADBOT_GITHUB_TOKEN: ${{ secrets.BROADBOT_GITHUB_TOKEN }} | ||
run: | | ||
cd firecloud-develop | ||
JIRA_TICKET=${{ github.event.inputs.jira_ticket }} | ||
OLD_CROMWELL_V=${{ github.event.inputs.old_cromwell_version }} | ||
NEW_CROMWELL_V=${{ github.event.inputs.new_cromwell_version }} | ||
NEW_BRANCH_NAME="${JIRA_TICKET}_cromwell_${NEW_CROMWELL_V}" | ||
TEMP=$(mktemp) | ||
git checkout -b "${NEW_BRANCH_NAME}" | ||
SED_STRING="s/${OLD_CROMWELL_V}/${NEW_CROMWELL_V}/g" | ||
FILES=( "base-configs/cromwell/cromwell.conf.ctmpl" "run-context/fiab/scripts/FiaB_images.env" ) | ||
for i in "${FILES[@]}" | ||
do | ||
echo "Updating ${i}" | ||
sed "${SED_STRING}" ${i} > ${TEMP} | ||
mv ${TEMP} ${i} | ||
git add ${i} | ||
done | ||
echo "Pushing to firecloud-develop branch ${NEW_BRANCH_NAME}" | ||
git config --global user.name "broadbot" | ||
git config --global user.email "broadbot@broadinstitute.org" | ||
git commit -m "Updating Cromwell version to ${NEW_CROMWELL_V}" | ||
git push https://broadbot:$BROADBOT_GITHUB_TOKEN@github.com/broadinstitute/firecloud-develop.git ${NEW_BRANCH_NAME} | ||
echo ::set-output name=NEW_BRANCH_NAME::${NEW_BRANCH_NAME} | ||
- name: Create firecloud-develop PR | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.BROADBOT_GITHUB_TOKEN }} | ||
script: | | ||
const result = await github.rest.pulls.create({ | ||
title: '${{ github.event.inputs.jira_ticket }}: Update Cromwell version to ${{ github.event.inputs.new_cromwell_version }}', | ||
owner: 'broadinstitute', | ||
repo: 'firecloud-develop', | ||
head: '${{ steps.update-and-push.outputs.NEW_BRANCH_NAME }}', | ||
base: 'dev', | ||
body: [ | ||
'This PR is auto-generated by', | ||
'[Cromwell actions/make_publish_prs](https://github.com/broadinstitute/cromwell/blob/develop/.github/workflows/make_publish_prs.yml), using', | ||
'[github actions/github-script](https://github.com/actions/github-script).', | ||
'', | ||
'It updates cromwell from version ${{ github.event.inputs.old_cromwell_version }} to ${{ github.event.inputs.new_cromwell_version }}.' | ||
].join('\n') | ||
}); | ||
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
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
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
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
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
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
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
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
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
Oops, something went wrong.