Skip to content
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

fix(docker): update path to CLI jar #1241

Merged
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
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.git/
.github/
docs/
Dockerfile
build/
config/
scripts/
22 changes: 21 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,27 @@ jobs:
echo ::set-output name=version::${AXION_VERSION}
echo ::set-output name=tags::${DOCKER_TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Build and push

# Build and push steps are split up in order to test the built contaire image in between
# - build-args and labels inputs _must_ be kept matching between both to prevent rebuild
# - See: https://github.com/docker/build-push-action/blob/master/docs/advanced/test-before-push.md
- name: Build Docker container image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
build-args: |
VERSION_TAG=${{ steps.prep.outputs.version }}
load: true
tags: ${{ steps.prep.outputs.tags }}
labels: |
org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY,,}.git
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
- name: Test Docker container image
run: docker run --rm ${{ steps.prep.outputs.tags }} --help
- name: Push Docker container image
uses: docker/build-push-action@v3
with:
context: .
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN ./gradlew shadowJar \


FROM openjdk:11-slim
COPY --from=build /build/main/build/libs/gtfs-validator-*-cli.jar /gtfs-validator-cli.jar
COPY --from=build /build/cli/build/libs/gtfs-validator-*-cli.jar /gtfs-validator-cli.jar
WORKDIR /

ARG VERSION_TAG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private static Arguments parseArguments(String[] argv) {
jCommander.usage();
System.out.println(
"⚠️ Note that parameters marked with an asterisk (*) in the help menu are mandatory.");
return null;
System.exit(0);
}
if (args.getExportNoticeSchema()) {
exportNoticeSchema(args);
Expand Down