Skip to content

Instantly share code, notes, and snippets.

@iainporter
Last active September 23, 2020 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iainporter/e1bbd01aa3da7518397e5beb58a5345f to your computer and use it in GitHub Desktop.
Save iainporter/e1bbd01aa3da7518397e5beb58a5345f to your computer and use it in GitHub Desktop.
build config for circleci and native image
# Install GraalVM and native-image, needed for a native Quarkus build
# ########################
- run:
name: Install GraalVM
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
curl https://github.com/oracle/graal/releases/download/vm-19.1.1/graalvm-ce-linux-amd64-19.1.1.tar.gz -O -J -L && tar xfz graalvm-ce-linux-amd64-19.1.1.tar.gz && mv graalvm-ce-19.1.1 .graalvm && rm graalvm-ce-linux-amd64-19.1.1.tar.gz
fi
- run:
name: Install native-image
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
$GRAALVM_HOME/bin/gu install native-image
fi
# Perform a native Quarkus build and verify
# ########################
- run:
name: Build (Native)
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
mvn clean package -Pnative -DskipTests -Dquarkus.native.native-image-xmx=8g -Dquarkus.container-image.tag=${VERSION}-native
fi
no_output_timeout: 30m
- run:
name: Verify (Native)
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
mvn verify -Pnative
fi
no_output_timeout: 30m
## Push native image to docker registry
- run:
name: Docker Push (Native)
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
docker push iainporter/sms-service:${VERSION}-native
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment