Merge "Integrate functest with ARM Architecture with alpine images"
[releng.git] / jjb / daisy4nfv / daisy-project-jobs.yml
1 ######################################################################
2 # Add daily jobs, for buidoing, deploying and testing
3 # TODO:
4 # - [ ] Add yardstick and functest for test stage
5 # - [x] Use daisy-baremetal-defauls for choosing baremetal deployment
6 ######################################################################
7
8 #############################
9 # Job configuration for daisy
10 #############################
11 - project:
12     name: daisy-project-jobs
13
14     project: 'daisy'
15
16     installer: 'daisy'
17
18     stream:
19         - master:
20             branch: '{stream}'
21             gs-pathname: ''
22             disabled: false
23         - euphrates:
24             branch: 'stable/{stream}'
25             gs-pathname: '/{stream}'
26             disabled: false
27
28     phase:
29         - 'build':
30             slave-label: 'opnfv-build-centos'
31         - 'deploy':
32             slave-label: 'daisy-baremetal'
33         - 'test':
34             slave-label: 'opnfv-build-centos'
35     jobs:
36         - '{installer}-daily-{stream}'
37         - '{installer}-{phase}-daily-{stream}'
38
39 ########################
40 # job templates
41 ########################
42 - job-template:
43     name: '{installer}-daily-{stream}'
44
45     project-type: multijob
46
47     disabled: false
48
49     concurrent: true
50
51     properties:
52         - logrotate-default
53         - throttle:
54             enabled: true
55             max-total: 4
56             option: 'project'
57         - build-blocker:
58             use-build-blocker: true
59             blocking-jobs:
60                 - '{installer}-daily-.*'
61                 - 'daisy4nfv-merge-build-.*'
62                 - 'daisy4nfv-verify-build-.*'
63             block-level: 'NODE'
64
65     scm:
66         - git-scm
67
68     triggers:
69         - timed: '0 8 * * *'
70
71     parameters:
72         - project-parameter:
73             project: '{project}'
74             branch: '{branch}'
75         - 'opnfv-build-centos-defaults'
76         - '{installer}-defaults'
77         - '{installer}-project-parameter':
78             gs-pathname: '{gs-pathname}'
79
80     wrappers:
81         - ssh-agent-wrapper
82         - timeout:
83             timeout: 360
84             fail: true
85
86     builders:
87         - description-setter:
88             description: "Built on $NODE_NAME"
89         - multijob:
90             name: build
91             condition: SUCCESSFUL
92             projects:
93                 - name: '{installer}-build-daily-{stream}'
94                   current-parameters: false
95                   predefined-parameters: |
96                     BRANCH=$BRANCH
97                     GERRIT_REFSPEC=$GERRIT_REFSPEC
98                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
99                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
100                   node-parameters: false
101                   kill-phase-on: FAILURE
102                   abort-all-job: true
103         - multijob:
104             name: deploy
105             condition: SUCCESSFUL
106             projects:
107                 - name: '{installer}-deploy-daily-{stream}'
108                   current-parameters: false
109                   predefined-parameters: |
110                     BRANCH=$BRANCH
111                     GERRIT_REFSPEC=$GERRIT_REFSPEC
112                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
113                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
114                   node-parameters: false
115                   kill-phase-on: FAILURE
116                   abort-all-job: true
117         - multijob:
118             name: test
119             condition: SUCCESSFUL
120             projects:
121                 - name: '{installer}-test-daily-{stream}'
122                   current-parameters: false
123                   predefined-parameters: |
124                     BRANCH=$BRANCH
125                     GERRIT_REFSPEC=$GERRIT_REFSPEC
126                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
127                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
128                   node-parameters: false
129                   kill-phase-on: FAILURE
130                   abort-all-job: true
131
132     publishers:
133         - '{installer}-recipients'
134         - email-jenkins-admins-on-failure
135
136 - job-template:
137     name: '{installer}-{phase}-daily-{stream}'
138
139     disabled: '{obj:disabled}'
140
141     concurrent: true
142
143     properties:
144         - logrotate-default
145         - throttle:
146             enabled: true
147             max-total: 6
148             option: 'project'
149
150     scm:
151         - git-scm
152
153     wrappers:
154         - ssh-agent-wrapper
155         - timeout:
156             timeout: 360
157             fail: true
158
159     parameters:
160         - project-parameter:
161             project: '{project}'
162             branch: '{branch}'
163         - '{installer}-defaults'
164         - '{slave-label}-defaults'
165         - string:
166             name: GIT_BASE
167             default: https://gerrit.opnfv.org/gerrit/$PROJECT
168             description: 'Git URL to use on this Jenkins Slave'
169         - string:
170             name: DEPLOY_SCENARIO
171             default: 'os-nosdn-nofeature-ha'
172         - '{installer}-project-parameter':
173             gs-pathname: '{gs-pathname}'
174
175     builders:
176         - description-setter:
177               description: "Built on $NODE_NAME"
178         - '{installer}-{phase}-daily-macro'
179
180 #####################################
181 # builder macros
182 #####################################
183 - builder:
184     name: 'daisy-build-daily-macro'
185     builders:
186         - shell:
187             !include-raw: ./daisy4nfv-basic.sh
188         - shell:
189             !include-raw: ./daisy4nfv-build.sh
190         - shell:
191             !include-raw: ./daisy4nfv-upload-artifact.sh
192         - 'clean-workspace'
193
194 - builder:
195     name: 'daisy-deploy-daily-macro'
196     builders:
197         - shell:
198             !include-raw: ./daisy4nfv-download-artifact.sh
199         - shell:
200             !include-raw: ./daisy-deploy.sh
201
202 - builder:
203     name: 'daisy-test-daily-macro'
204     builders:
205         - shell: |
206             #!/bin/bash
207
208             echo "Not activated!"
209
210 #####################################
211 # parameter macros
212 #####################################
213 - publisher:
214     name: 'daisy-recipients'
215     publishers:
216         - email:
217             recipients: hu.zhijiang@zte.com.cn lu.yao135@zte.com.cn zhou.ya@zte.com.cn yangyang1@zte.com.cn julienjut@gmail.com
218         - email-jenkins-admins-on-failure
219
220 - parameter:
221     name: 'daisy-project-parameter'
222     parameters:
223         - string:
224             name: BUILD_DIRECTORY
225             default: $WORKSPACE/build_output
226             description: "Directory where the build artifact will be located upon the completion of the build."
227         - string:
228             name: CACHE_DIRECTORY
229             default: $HOME/opnfv/cache/$INSTALLER_TYPE
230             description: "Directory where the cache to be used during the build is located."
231         - string:
232             name: GS_URL
233             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
234             description: "URL to Google Storage."