Make sure that shiplogs gets a maven-version
[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
16     platforms:
17       - centos
18       - ubuntu-16.04
19
20     templates:
21       - basebuild
22       - docker
23
24     exclude:
25       # only build the docker image on ubuntu at present
26       - platforms: centos
27         templates: docker
28
29 - job-template:
30     name: '{project}-verify-jjb'
31
32     project-type: freestyle
33     node: '{build-node}'
34     concurrent: true
35
36     properties:
37       - infra-properties:
38           build-days-to-keep: 14
39
40     parameters:
41       - infra-parameters:
42           project: '{project}'
43           branch: 'master'
44           refspec: 'refs/heads/master'
45           artifacts: '{archive-artifacts}'
46
47     scm:
48       - gerrit-trigger-scm:
49           refspec: '$GERRIT_REFSPEC'
50           choosing-strategy: 'gerrit'
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
81 - job-template:
82     name: '{project}-merge-jjb'
83
84     project-type: freestyle
85     node: '{build-node}'
86
87     properties:
88       - infra-properties:
89           build-days-to-keep: 14
90
91     parameters:
92       - infra-parameters:
93           project: '{project}'
94           branch: 'master'
95           refspec: 'refs/heads/master'
96           artifacts: '{archive-artifacts}'
97
98     scm:
99       - gerrit-trigger-scm:
100           refspec: ''
101           choosing-strategy: 'default'
102
103     wrappers:
104       - infra-wrappers:
105           build-timeout: '{build-timeout}'
106
107     triggers:
108       - gerrit-trigger-patch-merged:
109           server: '{server-name}'
110           project: '{project}'
111           branch: '{branch}'
112           files: 'jjb/**'
113
114     builders:
115       - config-file-provider:
116           files:
117             - file-id: 'jjbini'
118               variable: 'JJBINI'
119       - shell: |
120           virtualenv $WORKSPACE/venv
121           source $WORKSPACE/venv/bin/activate
122           pip install --upgrade pip
123           pip freeze
124           pip install jenkins-job-builder
125           jenkins-jobs --conf $JJBINI update --delete-old --workers 4 jjb/
126
127     publishers:
128       - infra-shiplogs:
129           maven-version: '{maven-version}'
130
131 - job-template:
132     name: '{project}-verify-packer'
133     project-type: freestyle
134     node: '{build-node}'
135     concurrent: true
136
137     properties:
138       - infra-properties:
139           build-days-to-keep: 14
140
141     parameters:
142       - infra-parameters:
143           project: '{project}'
144           branch: 'master'
145           refspec: 'refs/heads/master'
146           artifacts: '{archive-artifacts}'
147
148     scm:
149       - gerrit-trigger-scm:
150           refspec: '$GERRIT_REFSPEC'
151           choosing-strategy: 'gerrit'
152
153     wrappers:
154       - infra-wrappers:
155           build-timeout: '{build-timeout}'
156
157     triggers:
158       - gerrit-trigger-patch-submitted:
159           server: '{server-name}'
160           project: '{project}'
161           branch: 'master'
162           files: 'packer/**'
163
164     builders:
165       - packer-validate
166
167 #     publishers:
168 #       - infra-shiplogs
169
170 - job-template:
171     name: '{project}-merge-packer-{platforms}-{templates}'
172     project-type: freestyle
173     node: '{build-node}'
174     concurrent: true
175
176     properties:
177       - infra-properties:
178           build-days-to-keep: 14
179
180     parameters:
181       - infra-parameters:
182           project: '{project}'
183           branch: 'master'
184           refspec: 'refs/heads/master'
185           artifacts: '{archive-artifacts}'
186
187     scm:
188       - gerrit-trigger-scm:
189           refspec: ''
190           choosing-strategy: 'default'
191
192     wrappers:
193       - infra-wrappers:
194           build-timeout: '{build-timeout}'
195
196     triggers:
197       - gerrit-trigger-patch-merged:
198           server: '{server-name}'
199           project: '{project}'
200           branch: 'master'
201           files: 'packer/**'
202
203     builders:
204       - packer-validate
205       - packer-build:
206           platform: '{platforms}'
207           template: '{templates}'
208
209 #     publishers:
210 #       - infra-shiplogs