-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
71 lines (63 loc) · 2.21 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
#=============================================================================#
# General configuration #
#=============================================================================#
stages:
- build
- deploy
variables:
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
GIT_SUBMODULE_STRATEGY: "normal"
SWT_GTK3: "0"
P2_ENABLE_COMPOSITE: "1"
P2_COMPOSITE_NAME: "Cute C++ Unit Testing Easier"
P2_ROOT_BASE: "/var/lib/redmine/cute/public/updatesite"
P2_DESTINATION: "2019-12"
P2_SOURCE: "./CUTEProject/releng/ch.hsr.ifs.cute.update/target/repository"
#=============================================================================#
# Build jobs #
#=============================================================================#
.buildCommon: &BUILD_COMMON
stage: build
script:
- 'xvfb-run ./tools/build clean verify ${BUILD_FLAGS}'
cache:
key: "maven-$CI_PROJECT_ID"
paths:
- ".m2/repository"
policy: pull-push
Build Signed:
<<: *BUILD_COMMON
image: gitlab.dev.ifs.hsr.ch:45023/cevelop/docker-tycho-release:latest
only:
- master
- develop
- /^release\/.*$/
variables:
BUILD_FLAGS: "--sign"
artifacts:
paths:
- "./*/*/*/target/repository/**"
Build Unsigned:
<<: *BUILD_COMMON
image: gitlab.dev.ifs.hsr.ch:45023/cevelop/docker-tycho-build:latest
except:
- master
- develop
- /^release\/.*$/
#=============================================================================#
# Deployment jobs #
#=============================================================================#
Deploy:
stage: deploy
image: gitlab.dev.ifs.hsr.ch:45023/ifs/docker-alpine-ssh:latest
cache: {}
only:
- master
- develop
- /^release\/.*$/
dependencies:
- Build Signed
script:
- "export P2_ROOT=${P2_ROOT_BASE}$( (echo ${CI_COMMIT_REF_NAME} | grep develop &>/dev/null) && echo '-unstable')"
- "export P2_COMPOSITE_VERSION=$(sed -n 's/[ \\t]*<version>\\([0-9]\\.[0-9]\\.[0-9]\\)-SNAPSHOT<\\/version>/\\1/p' *Project/**/*.update/pom.xml | head -1)"
- "./tools/ci/deploy"