3.1.6.8 : Le fichier .gitlab-ci.yml complet

Le fichier .gitlab-ci.yml complet :
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
stages:
- Docker
- BuildTestinstall
- DocCoverage
- deploy


#########################################
#                                       #
#  Ubuntu 22.04 project build/test/doc  #
#                                       #
#########################################
                
package_ubuntu2204_build_image:
        stage: Docker
        image:
                #name: gcr.io/kaniko-project/executor:debug
                name: gcr.io/kaniko-project/executor:v1.18.0-debug
                entrypoint: [""]
        script:
                - ls ${CI_PROJECT_DIR}/scripts/
                - ${CI_PROJECT_DIR}/scripts/scriptCreateImage.sh docker/ubuntu2204_cibuild/Dockerfile "ci_build:0.1"
        rules:
                - if: $CI_COMMIT_TITLE == "docker"


#########################################
#                                       #
#    Ubuntu 20.04 package generation    #
#                                       #
#########################################
                
package_ubuntu2004_image:
        stage: Docker
        image:
                #name: gcr.io/kaniko-project/executor:debug
                name: gcr.io/kaniko-project/executor:v1.18.0-debug
                entrypoint: [""]
        script:
                - ls ${CI_PROJECT_DIR}/scripts/
                - ${CI_PROJECT_DIR}/scripts/scriptCreateImage.sh docker/ubuntu2004/Dockerfile "package_ubuntu2004:0.1"
        rules:
                - if: $CI_COMMIT_TITLE == "docker"


        
#########################################
#                                       #
#    Ubuntu 22.04 package generation    #
#                                       #
#########################################

package_ubuntu2204_image:
        stage: Docker
        image:
                #name: gcr.io/kaniko-project/executor:debug
                name: gcr.io/kaniko-project/executor:v1.18.0-debug
                entrypoint: [""]
        script:
                - ${CI_PROJECT_DIR}/scripts/scriptCreateImage.sh docker/ubuntu2204/Dockerfile "package_ubuntu2204:0.1"
        rules:
                - if: $CI_COMMIT_TITLE == "docker"



#########################################
#                                       #
#      Fedora 31 package generation     #
#                                       #
#########################################
                
package_fedora31_image:
        stage: Docker
        image:
                #name: gcr.io/kaniko-project/executor:debug
                name: gcr.io/kaniko-project/executor:v1.18.0-debug
                entrypoint: [""]
        script:
                - ${CI_PROJECT_DIR}/scripts/scriptCreateImage.sh docker/fedora31/Dockerfile "package_fedora31:0.1"
        rules:
                - if: $CI_COMMIT_TITLE == "docker"



#########################################
#                                       #
#      Fedora 36 package generation     #
#                                       #
#########################################

package_fedora36_image:
        stage: Docker
        image:
                #name: gcr.io/kaniko-project/executor:debug
                name: gcr.io/kaniko-project/executor:v1.18.0-debug
                entrypoint: [""]
        script:
                - ${CI_PROJECT_DIR}/scripts/scriptCreateImage.sh docker/fedora36/Dockerfile "package_fedora36:0.1"
        rules:
                - if: $CI_COMMIT_TITLE == "docker"

                
                
#########################################
#                                       #
#  Ubuntu 22.04 release/package upload  #
#                                       #
#########################################
                
package_ubuntu2204_release_image:
        stage: Docker
        image:
                #name: gcr.io/kaniko-project/executor:debug
                name: gcr.io/kaniko-project/executor:v1.18.0-debug
                entrypoint: [""]
        script:
                - ls ${CI_PROJECT_DIR}/scripts/
                - ${CI_PROJECT_DIR}/scripts/scriptCreateImage.sh docker/ubuntu2204_python3/Dockerfile "package_ubuntu2204_python3:0.1"
        rules:
                - if: $CI_COMMIT_TITLE == "docker"

                
                
dailyBuildMasterAll:
        #cache:
                #untracked: true
                #paths:
                #- build/
        image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/tests/testprojectreleaseontag/ci_build:0.1
        stage: BuildTestinstall
        script:
        - export LD_LIBRARY_PATH=/usr/lib
        - env
        - mkdir -p build
        - cd build
        - >
                cmake ..
                -DCMAKE_INSTALL_PREFIX=/usr
                -DRELEASE_MODE=yes
                -DSELF_TESTS_MODE=yes
        - make all
        - make install
        - make test
        only:
        - branches
        - tags
        tags:

TestCoverage:
        image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/tests/testprojectreleaseontag/ci_build:0.1
        stage: DocCoverage
        script:
        - export LD_LIBRARY_PATH=/usr/lib
        - env
        - mkdir -p build coverage
        - cd build
        - >
                cmake ..
                -DCMAKE_INSTALL_PREFIX=/usr
                -DRELEASE_MODE=yes
                -DSELF_TESTS_MODE=yes
                -DCMAKE_BUILD_TYPE=Coverage
        - make all
        - make install
        - make test
        - make ExperimentalCoverage
        - cd ../coverage
        - gcovr -r ../ --exclude-throw-branches --html cov_report.html --html-details
        - gcovr -r ../ --exclude-throw-branches --xml Coverage.xml
        - gcovr -r ../ --exclude-throw-branches
        artifacts:
                paths:
                - coverage
                expire_in: 8d
        only:
        - branches
        - tags
        tags:

Doc:
        image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/tests/testprojectreleaseontag/ci_build:0.1
        stage: DocCoverage
        script:
        - export LD_LIBRARY_PATH=/usr/lib
        - env
        - rm -fr build public
        - mkdir -p build
        - mkdir -p public
        - cd build
        - >
                cmake ..
                -DCMAKE_INSTALL_PREFIX=/usr
                -DRELEASE_MODE=yes
                -DDOC_MODE=yes
        - make all
        - make doc
        - scp -r doc/html/* ../public
        artifacts:
                paths:
                - public
                expire_in: 8d
        only:
        - branches
        - tags
        tags:

pages:
        stage: deploy
        script:
                - mv coverage public/
        artifacts:
                paths:
                - public
                expire_in: 8d

Ubuntu 2004:
        image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/tests/testprojectreleaseontag/package_ubuntu2004:0.1
        stage: DocCoverage
        script:
                - ./cmake/phoenix_createPackages.sh DEB package_ubuntu2004 false
        artifacts:
                paths:
                - package_ubuntu2004
                expire_in: 8d
        only:
        #- branches
        - tags

Ubuntu 2204:
        image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/tests/testprojectreleaseontag/package_ubuntu2204:0.1
        stage: DocCoverage
        script:
                - ./cmake/phoenix_createPackages.sh DEB package_ubuntu2204 false
        artifacts:
                paths:
                - package_ubuntu2204
                expire_in: 8d
        only:
        #- branches
        - tags
        
Fedora 31:
        image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/tests/testprojectreleaseontag/package_fedora31:0.1
        stage: DocCoverage
        script:
                - ./cmake/phoenix_createPackages.sh RPM package_fedora31 false
        artifacts:
                paths:
                - package_fedora31
                expire_in: 8d
        only:
        #- branches
        - tags

Fedora 36:
        image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/tests/testprojectreleaseontag/package_fedora36:0.1
        stage: DocCoverage
        script:
                - ./cmake/phoenix_createPackages.sh RPM package_fedora36 false
        artifacts:
                paths:
                - package_fedora36
                expire_in: 8d
        only:
        #- branches
        - tags
        
Release:
        image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/tests/testprojectreleaseontag/package_ubuntu2204_python3:0.1
        stage: deploy
        script:
        - echo "Let's do some release"
        - uname -a
        - python3 ./cmake/createReleaseCurl.py -n ${CI_PROJECT_TITLE} -i ${CI_PROJECT_ID} -t ${CI_COMMIT_TAG} -p ${CI_RELEASE_TOKEN}
        only:
        #- branches
        - tags
Lien de téléchargement ici.

N'hésitez pas à mettre à jour régulièrement l'image Kaniko. Cela permet de régler quelques problème de mise à jour. L'image gcr.io/kaniko-project/executor:v1.18.0-debug