-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
142 lines (130 loc) · 2.3 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
variables:
# 二进制优先, lint、package、publish 会有 --binary-first option
BINARY_FIRST: 1
# 不允许通知
DISABLE_NOTIFY: 0
before_script:
# https://gitlab.com/gitlab-org/gitlab-ce/issues/14983
# shared runner 会出现,special runner只会报warning
- export LANG=en_US.UTF-8
- export LANGUAGE=en_US:en
- export LC_ALL=en_US.UTF-8
- pwd
- git clone git@git.2dfire.net:ios/ci-yaml-shell.git
- ci-yaml-shell/before_shell_executor.sh
after_script:
- rm -fr ci-yaml-shell
stages:
- check
- lint
- test
- package
- binary_lint
- publish
- report
- cleanup
component_check:
stage: check
script:
- ci-yaml-shell/component_check_executor.rb
only:
- master
- /^release.*$/
- /^hotfix.*$/
- tags
- CI
tags:
- iOSCI
environment:
name: qa
lib_lint:
stage: lint
only:
- master
- /^release.*$/
- /^hotfix.*$/
# - tags
- CI
retry: 0
script:
- ci-yaml-shell/lib_lint_executor.sh
tags:
- iOSCI
environment:
name: qa
# oc_lint:
# stage: lint
# only:
# - master
# # - /^release.*$/
# - CI
# retry: 0
# script:
# - ci-yaml-shell/oclint_executor.sh lint_result
# after_script:
# - cat lint_result | python -m json.tool
# tags:
# - iOS
# unit_test:
# stage: test
# only:
# - master
# # - /^release.*$/
# - CI
# retry: 1
# script:
# - ci-yaml-shell/unit_test_executor.sh
# tags:
# - iOSCI
# environment:
# name: qa
package_framework:
stage: package
only:
- tags
script:
- ci-yaml-shell/framework_pack_executor.sh
tags:
- iOSCD
environment:
name: production
# binary_lint:
# stage: binary_lint
# only:
# - tags
# retry: 1
# script:
# - ci-yaml-shell/binary_lint_executor.sh
# tags:
# - iOS
publish_pod:
stage: publish
only:
- tags
retry: 0
script:
- ci-yaml-shell/publish_executor.sh
tags:
- iOSCD
environment:
name: production
# allow_failure: true
report_to_director:
stage: report
script:
- ci-yaml-shell/report_executor.sh
only:
- master
- tags
when: on_failure
tags:
- iOSCD
# cleanup:
# only:
# - master
# - /^release.*$/
# - tags
# stage: cleanup
# script:
# - ci-yaml-shell/cleanup_executor.sh
# when: always