-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml-bak
107 lines (93 loc) · 1.49 KB
/
.gitlab-ci.yml-bak
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
before_script:
- echo "before-script!!"
variables:
DOMAIN: example.com
stages:
- build
- test
- codescan
- deploy
build:
before_script:
- echo "before-script in job"
stage: build
tags:
- build
only:
- master
script:
- ls
- id
- mvn clean package -DskipTests
- ls target
- echo "$DOMAIN"
- false && true ; exit_code=$?
- if [ $exit_code -ne 0 ]; then echo "Previous command failed"; fi;
- sleep 2;
after_script:
- echo "after script in job"
cache:
key: build
paths:
- .m2/repository/
- target/
unittest:
stage: test
tags:
- build
only:
- master
script:
- echo "run test"
- ls target
retry:
max: 2
when:
- script_failure
interfacetest:
stage: test
tags:
- build
only:
- master
script:
- echo "run test"
- sleep 2;
deploy:
stage: deploy
tags:
- deploy
only:
- master
script:
- echo "hello deploy"
- sleep 2;
#when: manual
allow_failure: true
timedrollout:
stage: deploy
script:
- echo 'Rolling out 10% ...'
when: delayed
start_in: '2'
codescan:
stage: codescan
tags:
- build
script:
- echo "codescan"
- sleep 1;
#parallel: 5
rules:
- exists:
- Jenkinsfile
when: on_success
- changes:
- Jenkinsfile
when: on_success
- if: '$DOMAIN == "example.com"'
when: on_success
- when: on_success
after_script:
- echo "after-script"
- ech