-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
93 lines (86 loc) · 2.35 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
image: docker-registry.itds.ch/debian-openjdk17:latest
before_script:
- uname -a
- export GRADLE_USER_HOME=`pwd`/.gradle
- if [ ! -e $GRADLE_USER_HOME ] ; then mkdir -p $GRADLE_USER_HOME ; fi
- if [ ! -e $GRADLE_USER_HOME/gradle.properties ] ; then echo "" > $GRADLE_USER_HOME/gradle.properties ; fi
variables:
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64
GIT_SUBMODULE_STRATEGY: recursive
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
INT_PROJECT_NAME: pbs-portal
INT_PROJECT_SHORT_NAME: pbsportal
cache:
key: "$CI_JOB_STAGE"
policy: pull-push
paths:
- .gradle/wrapper
- .gradle/caches
stages:
- build-and-test
- deploy
- report
build:integration:
stage: build-and-test
script:
- ./gradlew -Dfile.encoding=UTF-8 -Dspring.profiles.active=${ITDS_ENV} build
except:
- master
- tags
- schedules
tags:
- docker
artifacts:
expire_in: 1 week
paths:
- build/reports
- build/test-results
- build/geb-reports
- build/libs/${INT_PROJECT_NAME}-${ITDS_ENV}.jar
reports:
junit: build/test-results/test/TEST-*.xml
variables:
ITDS_ENV: integration
POSTGRES_DB: pbsportal-test
POSTGRES_USER: pbsportal-test
POSTGRES_PASSWORD: pbsportal-test
services:
- name: docker-registry.itds.ch/postgres:13-bullseye
alias: database
- name: docker-registry.itds.ch/selenium/standalone-firefox:4.23.1
alias: selenium
build:production:
stage: build-and-test
script:
- ./gradlew -Dfile.encoding=UTF-8 -Dspring.profiles.active=${ITDS_ENV} build
only:
- master
tags:
- docker
artifacts:
expire_in: 6 mos
paths:
- build/reports
- build/test-results
- build/geb-reports
- build/libs/${INT_PROJECT_NAME}-${ITDS_ENV}.jar
reports:
junit: build/test-results/test/TEST-*.xml
variables:
ITDS_ENV: production
POSTGRES_DB: pbsportal-test
POSTGRES_USER: pbsportal-test
POSTGRES_PASSWORD: pbsportal-test
services:
- name: docker-registry.itds.ch/postgres:13-bullseye
alias: database
- name: docker-registry.itds.ch/selenium/standalone-firefox:4.6.0
alias: selenium
variables:
SE_SCREEN_WIDTH: 2970
SE_SCREEN_HEIGHT: 1160
SE_VNC_NO_PASSWORD: 1
SE_NODE_OVERRIDE_MAX_SESSIONS: "true"
SE_NODE_MAX_SESSIONS: 5
include:
local: .gitlab-ci-deployment.yml