-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move dev server image build into main CI workflow #141
Changes from 10 commits
5b088b8
d2095dd
dd4598f
e930626
82089b2
bb868a9
422d2c6
0a0364e
cfd1e53
b0716a2
83fee45
b47f09c
7b239e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,8 @@ jobs: | |
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@master | ||
with: | ||
driver: docker | ||
|
||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
|
@@ -64,12 +66,13 @@ jobs: | |
${{ runner.os }}-graphhopper-buildx | ||
# --------------------- | ||
|
||
# Build image for unit tests | ||
- name: Build test image | ||
# Build base image for unit tests | ||
- name: Build base image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
push: false | ||
load: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
file: Dockerfile.build | ||
tags: "us.gcr.io/model-159019/gh:${{ github.sha }}-dev" | ||
build-args: | | ||
|
@@ -80,6 +83,22 @@ jobs: | |
MININORCAL_OSM_PATH=${{ secrets.MININORCAL_OSM_PATH}} | ||
MININORCAL_GTFS_PATH=${{ secrets.MININORCAL_GTFS_PATH}} | ||
|
||
# Build the dev server image used in functional tests | ||
mark-idleman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Build the server | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we specify There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm great question, I vaguely recall hitting some issue with this but I can't find the relevant stack overflow post now lol, so let's try it 🤞 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aha, at least the error is explicit 😀
|
||
load: true | ||
file: Dockerfile.server | ||
tags: "us.gcr.io/model-159019/gh:${{ github.sha }}-server-dev" | ||
build-args: | | ||
BASE_IMAGE=us.gcr.io/model-159019/gh:${{ github.sha }}-dev | ||
|
||
- name: Push server-dev image | ||
run: | | ||
docker push us.gcr.io/model-159019/gh:${{ github.sha }}-server-dev | ||
|
||
- name: run unit tests | ||
run: | | ||
docker run -t -d --name testrunner us.gcr.io/model-159019/gh:${{ github.sha }}-dev /bin/bash | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was needed due to a weird detail of how
load: true
works. Some context here, it failed without this and then worked when I added it, so I didn't dig too much deeper 🤷