-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
34 lines (31 loc) · 1.16 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
variables:
COMMON_BIND_HOST: "0.0.0.0"
DEPLOY_DOCKER_HELM: "true"
DEPLOY_TIMESTAMP: "$DEPLOY_TIMESTAMP"
DOCKER_DRIVER: "$DIND_DRIVER"
DOCKER_HOST: "$DIND_HOST"
DOCKER_TLS_CERTDIR: "$DIND_TLS_CERTDIR"
MAVEN_CLI: "-Ddocker.registry=$DOCKER_REGISTRY -Dhelm.deploy.url=$HELM_REGISTRY -Dhelm.deploy.type=$HELM_TYPE -Dmaven.deploy.releases=$MAVEN_DEPLOY_RELEASES -Dmaven.deploy.snapshots=$MAVEN_DEPLOY_SNAPSHOTS --batch-mode --errors --fail-fast --show-version"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
default:
image: maven:3.8.4-eclipse-temurin-17
services:
- name: "$DIND_IMAGE"
alias: docker
entrypoint: [ "env", "-u", "DOCKER_HOST" ]
command: [ "dockerd-entrypoint.sh" ]
stages:
- deploy
deploy:
stage: deploy
rules:
- if: $CI_COMMIT_BRANCH =~ /^maven\/release\/.*/ && $CI_PIPELINE_SOURCE == "pipeline"
- if: $CI_COMMIT_TAG && $CI_PIPELINE_SOURCE == "pipeline"
- if: $CI_COMMIT_BRANCH !~ /^maven\/release\/.*/ && $CI_COMMIT_TAG == null
artifacts:
paths:
- Backend/services/module/target/surefire-reports
when: on_failure
expire_in: 3 day
script:
- mvn $MAVEN_CLI -s .mvn/settings.xml deploy