Skip to content
Snippets Groups Projects

Draft: Resolve "Extrahovat Gateway z projketu dna-analyser"

Open xkoloma1 requested to merge 1-extrahovat-gateway-z-projketu-dna-analyser into main
Compare and Show latest version
3 files
+ 36
5
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 35
5
variables:
SPRING_PROFILES_ACTIVE: gitlab
DOCKER_HOST: $DOCKER_HOST_BIO
#IMAGE_TAG: $CI_COMMIT_TAG || "latest"
IMAGE_TAG: "latest"
#services:
# - docker:dind
cache:
untracked: true
key: "$CI_COMMIT_MESSAGE"
paths:
- .gradle
- build
stages:
- analyse
@@ -35,15 +49,28 @@ code_quality_json:
# Stage: build
# ===========================================================================
build-bootJar:
gradlew-bootJar:
stage: build
image: eclipse-temurin:17-jdk-alpine
script:
- ./gradlew bootJar
build-image:
docker-build:
rules:
- if: $CI_COMMIT_TAG != ""
variables:
IMAGE_TAG: $CI_COMMIT_TAG
variables:
DOCKER_HOST: $DOCKER_HOST_BIO
stage: build
image: docker:git
script:
- docker build -t $DOCKER_NAMESPACE/gateway:latest
- echo $IMAGE_TAG
- docker build -t $DOCKER_NAMESPACE/gateway:$IMAGE_TAG .
- docker save -o build/image.tar $DOCKER_NAMESPACE/gateway:$IMAGE_TAG
artifacts:
paths:
- build/image.tar
# ===========================================================================
# Stage: test
@@ -51,6 +78,7 @@ build-image:
verification-unit:
stage: verification
image: eclipse-temurin:17-jdk-alpine
allow_failure: true
script:
- ./gradlew test
@@ -61,6 +89,7 @@ verification-unit:
verification-env:
stage: verification
image: eclipse-temurin:17-jdk-alpine
allow_failure: true
before_script:
- export $(xargs < .env)
@@ -71,15 +100,16 @@ verification-env:
# Stage: publish
# ===========================================================================
publish:
docker-push:
stage: publish
image: docker
only:
- master
- /^verze_\d+\.\d+\.\d+$/
before_script:
- export $(xargs < .env)
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
script:
- docker load -i build/image.tar
- docker push $DOCKER_NAMESPACE/gateway:$TAG
# ===========================================================================