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
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!94Build native images in CI pipeline,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
Pipeline #2276 passed
...@@ -176,7 +176,7 @@ deploy-uc4-load-generator: ...@@ -176,7 +176,7 @@ deploy-uc4-load-generator:
# Theodolite Framework # Theodolite Framework
.theodolite: .theodolite:
image: openjdk:11-jdk image: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
tags: tags:
- exec-docker - exec-docker
variables: variables:
...@@ -189,23 +189,33 @@ deploy-uc4-load-generator: ...@@ -189,23 +189,33 @@ deploy-uc4-load-generator:
- cd theodolite-quarkus - cd theodolite-quarkus
- export GRADLE_USER_HOME=`pwd`/.gradle - export GRADLE_USER_HOME=`pwd`/.gradle
build-theodolite: build-theodolite-jvm:
stage: build stage: build
extends: .theodolite extends: .theodolite
# script: ./gradlew --build-cache assemble -Dquarkus.package.type=native
script: ./gradlew --build-cache assemble script: ./gradlew --build-cache assemble
artifacts: artifacts:
paths: paths:
- "theodolite-quarkus/build/lib/*" - "theodolite-quarkus/build/lib/*"
- "theodolite-quarkus/build/*-runner.jar" - "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 expire_in: 1 day
test-theodolite: test-theodolite:
stage: test stage: test
extends: .theodolite extends: .theodolite
needs: needs:
- build-theodolite - build-theodolite-jvm
- build-theodolite-native
script: ./gradlew test --stacktrace script: ./gradlew test --stacktrace
# Disabled for now # Disabled for now
...@@ -213,7 +223,7 @@ test-theodolite: ...@@ -213,7 +223,7 @@ test-theodolite:
stage: check stage: check
extends: .theodolite extends: .theodolite
needs: needs:
- build-theodolite - build-theodolite-jvm
- test-theodolite - test-theodolite
script: ./gradlew ktlintCheck --continue script: ./gradlew ktlintCheck --continue
...@@ -222,7 +232,7 @@ test-theodolite: ...@@ -222,7 +232,7 @@ test-theodolite:
stage: check stage: check
extends: .theodolite extends: .theodolite
needs: needs:
- build-theodolite - build-theodolite-jvm
- test-theodolite - test-theodolite
script: ./gradlew detekt --continue script: ./gradlew detekt --continue
...@@ -232,12 +242,12 @@ deploy-theodolite: ...@@ -232,12 +242,12 @@ deploy-theodolite:
- .theodolite - .theodolite
- .dind - .dind
needs: needs:
- build-theodolite - build-theodolite-native
- test-theodolite - test-theodolite
script: script:
- DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//') - 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.native -t theodolite .
- docker build -f src/main/docker/Dockerfile.jvm -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}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:$DOCKER_TAG_NAME$CI_COMMIT_SHORT_SHA"
- "[ $CI_COMMIT_TAG ] && docker tag theodolite $CR_HOST/$CR_ORG/theodolite:$CI_COMMIT_TAG" - "[ $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.
Please register or to comment