Disable blocking on buildable queue (Functest)
[releng.git] / jjb / releng / testresults-automate.yaml
1 ---
2 - project:
3     name: testresults-automate
4     stream:
5       - master:
6           branch: '{stream}'
7
8     module:
9       - 'testapi'
10       - 'reporting'
11
12     phase:
13       - 'docker-deploy':
14           slave-label: 'testresults'
15       - 'generate-doc'
16
17     jobs:
18       - '{module}-automate-{stream}'
19       - '{module}-automate-{phase}-{stream}'
20
21     project: 'releng-testresults'
22
23 - job:
24     name: 'testapi-mongodb-backup'
25
26     parameters:
27       - label:
28           name: SLAVE_LABEL
29           default: 'testresults'
30           description: 'Slave label on Jenkins'
31           all-nodes: false
32           node-eligibility: 'ignore-offline'
33       - project-parameter:
34           project: 'releng-testresults'
35           branch: 'master'
36       - string:
37           name: GIT_BASE
38           default: https://gerrit.opnfv.org/gerrit/releng-testresults
39           description: 'Git URL to use on this Jenkins Slave'
40
41     scm:
42       - git-scm
43
44     triggers:
45       - timed: '@weekly'
46
47     builders:
48       - mongodb-backup
49
50     publishers:
51       - email:
52           recipients: serena.feng.711@gmail.com
53           notify-every-unstable-build: true
54           send-to-individuals: true
55
56 - job-template:
57     name: '{module}-automate-{stream}'
58
59     project-type: multijob
60
61     properties:
62       - throttle:
63           enabled: true
64           max-total: 1
65           max-per-node: 1
66           option: 'project'
67
68     parameters:
69       - project-parameter:
70           project: '{project}'
71           branch: '{branch}'
72       - string:
73           name: DOCKER_TAG
74           default: 'latest'
75           description: 'Tag name for {module} docker image'
76       - string:
77           name: MODULE_NAME
78           default: '{module}'
79           description: "Name of the module"
80       - 'opnfv-build-defaults'
81
82     scm:
83       - git-scm
84
85     wrappers:
86       - ssh-agent-wrapper
87       - timeout:
88           timeout: 360
89           fail: true
90
91     triggers:
92       - gerrit-trigger-change-merged:
93           project: '**'
94           branch: '{branch}'
95           files: '{module}/**'
96
97     builders:
98       - description-setter:
99           description: "Built on $NODE_NAME"
100       - docker-update
101       - multijob:
102           name: docker-deploy
103           condition: SUCCESSFUL
104           projects:
105             - name: '{module}-automate-docker-deploy-{stream}'
106               current-parameters: false
107               predefined-parameters: |
108                 GIT_BASE=$GIT_BASE
109               node-label-name: SLAVE_LABEL
110               node-label: testresults
111               kill-phase-on: FAILURE
112               abort-all-job: true
113       - multijob:
114           name: generate-doc
115           condition: SUCCESSFUL
116           projects:
117             - name: '{module}-automate-generate-doc-{stream}'
118               current-parameters: true
119               kill-phase-on: FAILURE
120               abort-all-job: true
121
122     publishers:
123       - 'email-publisher'
124       - email-jenkins-admins-on-failure
125
126 - job-template:
127     name: '{module}-automate-{phase}-{stream}'
128
129     properties:
130       - throttle:
131           enabled: true
132           max-per-node: 1
133           option: 'project'
134
135     parameters:
136       - project-parameter:
137           project: '{project}'
138           branch: '{branch}'
139
140     wrappers:
141       - ssh-agent-wrapper
142       - timeout:
143           timeout: 120
144           fail: true
145
146     scm:
147       - git-scm
148
149     builders:
150       - description-setter:
151           description: "Built on $NODE_NAME"
152       - '{module}-automate-{phase}-macro'
153
154 ################################
155 # job builders
156 ################################
157 - builder:
158     name: 'docker-update'
159     builders:
160       - shell: |
161           bash ./ci/docker-update.sh
162
163 - builder:
164     name: 'testapi-automate-generate-doc-macro'
165     builders:
166       - 'testapi-doc-build'
167       - 'upload-doc-artifact'
168
169 - builder:
170     name: 'testapi-doc-build'
171     builders:
172       - shell: |
173           bash ./ci/htmlize/doc-build.sh
174
175 - builder:
176     name: 'upload-doc-artifact'
177     builders:
178       - shell: |
179            bash ./ci/htmlize/push-doc-artifacts.sh
180
181 - builder:
182     name: 'reporting-automate-generate-doc-macro'
183     builders:
184       - shell: echo "To Be Done"
185
186 - builder:
187     name: 'testapi-automate-docker-deploy-macro'
188     builders:
189       - shell: |
190           sudo bash ./ci/docker-deploy.sh "sudo docker run -dti --name testapi -p 8082:8000
191           -e mongodb_url=mongodb://172.17.0.1:27017
192           -e base_url=http://testresults.opnfv.org/test opnfv/testapi" \
193           "http://testresults.opnfv.org/test/" "testapi"
194
195 - builder:
196     name: 'reporting-automate-docker-deploy-macro'
197     builders:
198       - shell: |
199           sudo bash ./ci/docker-deploy.sh \
200           "sudo docker run -itd --name reporting -p 8084:8000 opnfv/reporting" \
201           "http://testresults.opnfv.org/reporting/index.html" "reporting"
202
203 - builder:
204     name: mongodb-backup
205     builders:
206       - shell:
207           bash ./ci/testapi-backup-mongodb.sh
208
209 ################################
210 # job publishers
211 ################################
212
213 - publisher:
214     name: 'email-publisher'
215     publishers:
216       - email:
217           recipients: rohitsakala@gmail.com feng.xiaowei@zte.com.cn morgan.richomme@orange.com
218           notify-every-unstable-build: false
219           send-to-individuals: true