Scrub infra templates and macros of ecomp
[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
130 - job-template:
131     name: '{project}-verify-packer'
132     project-type: freestyle
133     node: '{build-node}'
134     concurrent: true
135
136     properties:
137       - infra-properties:
138           build-days-to-keep: 14
139
140     parameters:
141       - infra-parameters:
142           project: '{project}'
143           branch: 'master'
144           refspec: 'refs/heads/master'
145           artifacts: '{archive-artifacts}'
146
147     scm:
148       - gerrit-trigger-scm:
149           refspec: '$GERRIT_REFSPEC'
150           choosing-strategy: 'gerrit'
151
152     wrappers:
153       - infra-wrappers:
154           build-timeout: '{build-timeout}'
155
156     triggers:
157       - gerrit-trigger-patch-submitted:
158           server: '{server-name}'
159           project: '{project}'
160           branch: 'master'
161           files: 'packer/**'
162
163     builders:
164       - packer-validate
165
166 #     publishers:
167 #       - infra-shiplogs
168
169 - job-template:
170     name: '{project}-merge-packer-{platforms}-{templates}'
171     project-type: freestyle
172     node: '{build-node}'
173     concurrent: true
174
175     properties:
176       - infra-properties:
177           build-days-to-keep: 14
178
179     parameters:
180       - infra-parameters:
181           project: '{project}'
182           branch: 'master'
183           refspec: 'refs/heads/master'
184           artifacts: '{archive-artifacts}'
185
186     scm:
187       - gerrit-trigger-scm:
188           refspec: ''
189           choosing-strategy: 'default'
190
191     wrappers:
192       - infra-wrappers:
193           build-timeout: '{build-timeout}'
194
195     triggers:
196       - gerrit-trigger-patch-merged:
197           server: '{server-name}'
198           project: '{project}'
199           branch: 'master'
200           files: 'packer/**'
201
202     builders:
203       - packer-validate
204       - packer-build:
205           platform: '{platforms}'
206           template: '{templates}'
207
208 #     publishers:
209 #       - infra-shiplogs