Merge "Checkout submodules recursively."
[ci-management.git] / jjb / ci-management / ci-management.yaml
1 ---
2 - project:
3     name: ci-management-jobs
4     project: 'ci-management'
5     jobs:
6       - '{project}-verify-jjb'
7       - '{project}-merge-jjb'
8       - '{project}-verify-packer'
9       - '{project}-merge-packer-{platforms}-{templates}'
10
11     archive-artifacts: '**/*.log'
12     branch: 'master'
13     build-timeout: '60'
14     build-node: 'centos7-basebuild-2c-1g'
15     platforms:
16       - centos
17       - ubuntu-16.04
18
19     templates:
20       - basebuild
21       - docker
22
23     exclude:
24       # only build the docker image on ubuntu at present
25       - platforms: centos
26         templates: docker
27
28 - job-template:
29     name: '{project}-verify-jjb'
30
31     project-type: freestyle
32     node: '{build-node}'
33     concurrent: true
34
35     properties:
36       - infra-properties:
37           build-days-to-keep: 14
38
39     parameters:
40       - infra-parameters:
41           project: '{project}'
42           branch: 'master'
43           refspec: 'refs/heads/master'
44           artifacts: '{archive-artifacts}'
45
46     scm:
47       - gerrit-trigger-scm:
48           refspec: '$GERRIT_REFSPEC'
49           choosing-strategy: 'gerrit'
50           submodule-recursive: '{submodule-recursive}'
51
52     wrappers:
53       - infra-wrappers:
54           build-timeout: '{build-timeout}'
55
56     triggers:
57       - gerrit-trigger-patch-submitted:
58           server: '{server-name}'
59           project: '{project}'
60           branch: '{branch}'
61           files: 'jjb/**'
62
63     builders:
64       - config-file-provider:
65           files:
66             - file-id: 'jjbini'
67               variable: 'JJBINI'
68       - shell: |
69           virtualenv $WORKSPACE/venv
70           source $WORKSPACE/venv/bin/activate
71           pip install --upgrade pip
72           pip freeze
73           pip install jenkins-job-builder
74           jenkins-jobs -l DEBUG --conf $JJBINI test -o archives/job_output jjb/
75           gzip archives/job_output/*
76       - ci-management-check-unicode
77
78     publishers:
79       - infra-shiplogs:
80           maven-version: '{maven-version}'
81
82 - job-template:
83     name: '{project}-merge-jjb'
84
85     project-type: freestyle
86     node: '{build-node}'
87
88     properties:
89       - infra-properties:
90           build-days-to-keep: 14
91
92     parameters:
93       - infra-parameters:
94           project: '{project}'
95           branch: 'master'
96           refspec: 'refs/heads/master'
97           artifacts: '{archive-artifacts}'
98
99     scm:
100       - gerrit-trigger-scm:
101           refspec: ''
102           choosing-strategy: 'default'
103           submodule-recursive: '{submodule-recursive}'
104
105     wrappers:
106       - infra-wrappers:
107           build-timeout: '{build-timeout}'
108
109     triggers:
110       - gerrit-trigger-patch-merged:
111           server: '{server-name}'
112           project: '{project}'
113           branch: '{branch}'
114           files: 'jjb/**'
115
116     builders:
117       - config-file-provider:
118           files:
119             - file-id: 'jjbini'
120               variable: 'JJBINI'
121       - shell: |
122           virtualenv $WORKSPACE/venv
123           source $WORKSPACE/venv/bin/activate
124           pip install --upgrade pip
125           pip freeze
126           pip install jenkins-job-builder
127           jenkins-jobs --conf $JJBINI update --delete-old --workers 4 jjb/
128
129     publishers:
130       - infra-shiplogs:
131           maven-version: '{maven-version}'
132
133 - job-template:
134     name: '{project}-verify-packer'
135     project-type: freestyle
136     node: '{build-node}'
137     concurrent: true
138
139     properties:
140       - infra-properties:
141           build-days-to-keep: 14
142
143     parameters:
144       - infra-parameters:
145           project: '{project}'
146           branch: 'master'
147           refspec: 'refs/heads/master'
148           artifacts: '{archive-artifacts}'
149
150     scm:
151       - gerrit-trigger-scm:
152           refspec: '$GERRIT_REFSPEC'
153           choosing-strategy: 'gerrit'
154           submodule-recursive: '{submodule-recursive}'
155
156     wrappers:
157       - infra-wrappers:
158           build-timeout: '{build-timeout}'
159
160     triggers:
161       - gerrit-trigger-patch-submitted:
162           server: '{server-name}'
163           project: '{project}'
164           branch: 'master'
165           files: 'packer/**'
166
167     builders:
168       - packer-validate
169
170     publishers:
171       - infra-shiplogs:
172           maven-version: '{maven-version}'
173 - job-template:
174     name: '{project}-merge-packer-{platforms}-{templates}'
175     project-type: freestyle
176     node: '{build-node}'
177     concurrent: true
178
179     properties:
180       - infra-properties:
181           build-days-to-keep: 14
182
183     parameters:
184       - infra-parameters:
185           project: '{project}'
186           branch: 'master'
187           refspec: 'refs/heads/master'
188           artifacts: '{archive-artifacts}'
189
190     scm:
191       - gerrit-trigger-scm:
192           refspec: ''
193           choosing-strategy: 'default'
194           submodule-recursive: '{submodule-recursive}'
195
196     wrappers:
197       - infra-wrappers:
198           build-timeout: '{build-timeout}'
199
200     triggers:
201       - gerrit-trigger-patch-merged:
202           server: '{server-name}'
203           project: '{project}'
204           branch: 'master'
205           files: 'packer/**'
206
207     builders:
208       - packer-validate
209       - packer-build:
210           platform: '{platforms}'
211           template: '{templates}'
212
213     publishers:
214       - infra-shiplogs:
215           maven-version: '{maven-version}'