Last active
September 23, 2020 15:41
-
-
Save iainporter/e1bbd01aa3da7518397e5beb58a5345f to your computer and use it in GitHub Desktop.
build config for circleci and native image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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