-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
58 lines (51 loc) · 1.36 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
stages:
- prepare
- package
- build
- analyze
variables:
BUILD_ENV: build.env
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
default:
image: maven:3.8-openjdk-17
prepare_job:
stage: prepare
script:
- export VERSION=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)
- echo "VERSION=${VERSION}" >> ${BUILD_ENV}
artifacts:
reports:
dotenv: ${BUILD_ENV}
only:
- master
quarkus-package:
stage: package
script:
- mvn $MAVEN_OPTS clean install -DskipTests=true
artifacts:
paths:
- target/**
only:
- master
docker-build-push:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [ "" ]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/src/main/docker/Dockerfile.jvm"
--destination "${CI_REGISTRY}/cs3/rnd/aero/knative-serverless-controller:${VERSION}"
only:
- master
analyze:sonar:
stage: analyze
script:
- mvn $MAVEN_CLI_OPTS $MAVEN_OPTS verify sonar:sonar -Dsonar.qualitygate.wait=true -DskipTests=true
allow_failure: true
only:
- master