Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/chart_update_on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,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 Down
37 changes: 37 additions & 0 deletions .github/workflows/docker_build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 'Docker Build Test'

# This test verifies that we can successfully build the same docker images that we release.
# Includes `cromwell`, `womtool`, `cromiam`, and `cromwell-drs-localizer`
# See chart_update_on_merge.yml for the actual release workflow.

run-name: ${{ github.actor }} Docker Build Test

on:
workflow_dispatch:
push:
merge_group:

permissions:
contents: read

jobs:
sbt-build:
name: sbt docker build
runs-on: ubuntu-latest
steps:
- name: Clone Cromwell
uses: actions/checkout@v2
with:
repository: broadinstitute/cromwell
token: ${{ secrets.BROADBOT_GITHUB_TOKEN }}
path: cromwell
- uses: olafurpg/setup-scala@v10
with:
java-version: adopt@1.11
# The following invocation should be as similar as possible to the one in chart_update_on_merge.yml
# To state the obvious: This test should not publish anything. It should simply verify that the build completes.
- name: Build Cromwell Docker
run: |
set -e
cd cromwell
sbt -Dproject.isSnapshot=false -Dproject.isRelease=false docker
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is sbt [...] docker equivalent to calling

sbt server/docker
sbt womtool/docker
sbt cromiam/docker
[...]

If so, very cool and TIL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost, but not exactly equivalent. In my understanding sbt docker will build everything it can find at the project level, while sbt womtool/docker will build only the subproject womtool.

sbt server/docker
sbt womtool/docker
sbt cromiam/docker

^ Isn't quite the same since it starts up/shuts down the sbt environment each time you call the command, which is significantly slower than doing everything in the same go. The end result is the same, though.

The same goes for tests: sbt test will run all unit tests, but sbt server/test will run only the server tests.