From 7251cf0d5fb5ef6b5baf0de8bcc83d7dab63dd7d Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Mon, 21 Nov 2022 16:41:49 -0500 Subject: [PATCH] Update CQLT, Java, Platform, Events (#33) * Update CQLT, Java, Platform, Events * Upate CQL Translator to 1.5.12 * Update Java to Temurin 11 * Update Docker image to support AMD and ARM platforms * Update Docker Publish action to trigger on PRs * Fix syntax of conditional expression in GitHub Action file --- .github/workflows/docker-publish-workflow.yml | 3 +++ Dockerfile | 4 ++-- README.md | 10 ++++++++-- pom.xml | 16 ++++++++-------- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-publish-workflow.yml b/.github/workflows/docker-publish-workflow.yml index 3c251b5..9482b4a 100644 --- a/.github/workflows/docker-publish-workflow.yml +++ b/.github/workflows/docker-publish-workflow.yml @@ -6,6 +6,7 @@ name: Publish Docker image on: + pull_request: release: types: [published] @@ -39,9 +40,11 @@ jobs: uses: docker/build-push-action@v3 with: context: . + platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} - + if: github.event_name == 'release' name: Update repo description uses: peter-evans/dockerhub-description@v3 with: diff --git a/Dockerfile b/Dockerfile index 2752bd1..0867ecc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # fetch basic image -FROM maven:3.6.1-jdk-8 +FROM maven:3.8.6-eclipse-temurin-11 # application placed into /opt/app RUN mkdir -p /app @@ -19,4 +19,4 @@ EXPOSE 8080 # execute it # CMD ["mvn", "exec:java"] -CMD ["java", "-jar", "target/cqlTranslationServer-1.5.10-jar-with-dependencies.jar", "-d"] +CMD ["java", "-jar", "target/cqlTranslationServer-1.5.12-jar-with-dependencies.jar", "-d"] diff --git a/README.md b/README.md index 007dd4a..b597b9b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Build: Execute via the command line: - java -jar target/cqlTranslationServer-1.5.10-jar-with-dependencies.jar + java -jar target/cqlTranslationServer-1.5.12-jar-with-dependencies.jar ## Translator Endpoint @@ -277,10 +277,16 @@ You may deploy pre-built Docker images into your existing hosting environment wi And you're done. No environment variables or further configuration are needed. Jedis may use your existing Kubernetes, Open Shift etc installations as you see fit. :) -To build your own image: +To build your own image for your current architecture: docker build -t cqframework/cql-translation-service:latest . # but use your your own repo and tag strings! +To build your own image for multiple architectures (e.g., Intel and Mac M1): + + docker buildx build --platform linux/amd64,linux/arm64 -t cqframework/cql-translation-service:latest . # but use your your own repo and tag strings! + +Note that Docker doesn't support loading multi-platform builds locally, so the above multi-platform build commmand is only helpful when used with `--push`. See: [https://github.com/docker/buildx/issues/59](https://github.com/docker/buildx/issues/59). + ## Environment Variables **CQL_TRANSLATOR_PORT** - Allows you to set the port on which the translation service runs, default value is 8080 diff --git a/pom.xml b/pom.xml index a00b46f..25a8cc5 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.mitre.bonnie cqlTranslationServer jar - 1.5.10 + 1.5.12 cqlTranslationServer @@ -70,37 +70,37 @@ info.cqframework cql - 1.5.10 + 1.5.12 info.cqframework model - 1.5.10 + 1.5.12 info.cqframework cql-to-elm - 1.5.10 + 1.5.12 info.cqframework elm - 1.5.10 + 1.5.12 info.cqframework quick - 1.5.10 + 1.5.12 info.cqframework qdm - 1.5.10 + 1.5.12 info.cqframework cql-formatter - 1.5.10 + 1.5.12 commons-cli