Skip to content
Snippets Groups Projects
Commit 39fbf337 authored by Sören Henning's avatar Sören Henning
Browse files

Merge branch 'build-native-images' into 'theodolite-kotlin'

Build native images in CI pipeline

See merge request !94
parents 1384573c 1aca475f
No related branches found
No related tags found
Loading
Pipeline #2276 passed
......@@ -176,7 +176,7 @@ deploy-uc4-load-generator:
# Theodolite Framework
.theodolite:
image: openjdk:11-jdk
image: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
tags:
- exec-docker
variables:
......@@ -189,23 +189,33 @@ deploy-uc4-load-generator:
- cd theodolite-quarkus
- export GRADLE_USER_HOME=`pwd`/.gradle
build-theodolite:
build-theodolite-jvm:
stage: build
extends: .theodolite
# script: ./gradlew --build-cache assemble -Dquarkus.package.type=native
script: ./gradlew --build-cache assemble
artifacts:
paths:
- "theodolite-quarkus/build/lib/*"
- "theodolite-quarkus/build/*-runner.jar"
# - "theodolite-quarkus/build/*-runner" # For native image
expire_in: 1 day
build-theodolite-native:
stage: build
extends: .theodolite
script:
- gu install native-image # TODO move to image
- ./gradlew --build-cache assemble -Dquarkus.package.type=native
artifacts:
paths:
- "theodolite-quarkus/build/*-runner"
expire_in: 1 day
test-theodolite:
stage: test
extends: .theodolite
needs:
- build-theodolite
- build-theodolite-jvm
- build-theodolite-native
script: ./gradlew test --stacktrace
# Disabled for now
......@@ -213,7 +223,7 @@ test-theodolite:
stage: check
extends: .theodolite
needs:
- build-theodolite
- build-theodolite-jvm
- test-theodolite
script: ./gradlew ktlintCheck --continue
......@@ -222,7 +232,7 @@ test-theodolite:
stage: check
extends: .theodolite
needs:
- build-theodolite
- build-theodolite-jvm
- test-theodolite
script: ./gradlew detekt --continue
......@@ -232,12 +242,12 @@ deploy-theodolite:
- .theodolite
- .dind
needs:
- build-theodolite
- build-theodolite-native
- test-theodolite
script:
- DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//')
#- docker build -f src/main/docker/Dockerfile.native -t theodolite .
- docker build -f src/main/docker/Dockerfile.jvm -t theodolite .
- docker build -f src/main/docker/Dockerfile.native -t theodolite .
#- docker build -f src/main/docker/Dockerfile.jvm -t theodolite .
- "[ ! $CI_COMMIT_TAG ] && docker tag theodolite $CR_HOST/$CR_ORG/theodolite:${DOCKER_TAG_NAME}latest"
- "[ ! $CI_COMMIT_TAG ] && docker tag theodolite $CR_HOST/$CR_ORG/theodolite:$DOCKER_TAG_NAME$CI_COMMIT_SHORT_SHA"
- "[ $CI_COMMIT_TAG ] && docker tag theodolite $CR_HOST/$CR_ORG/theodolite:$CI_COMMIT_TAG"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment