3d0db65876fee55484e24d0b95bd21da57dca0b9
[releng.git] / jjb / armband / armband-ci-jobs.yml
1 # jenkins job templates for Armband
2 - project:
3     name: 'armband-ci'
4     project: 'armband'
5     installer: 'fuel'
6
7 #--------------------------------
8 # BRANCH ANCHORS
9 #--------------------------------
10     master: &master
11         stream: master
12         branch: '{stream}'
13         gs-pathname: ''
14     brahmaputra: &brahmaputra
15         stream: brahmaputra
16         branch: 'stable/{stream}'
17         gs-pathname: '/{stream}'
18 #--------------------------------
19 # POD, INSTALLER, AND BRANCH MAPPING
20 #--------------------------------
21 #        brahmaputra
22 #--------------------------------
23     pod:
24         - arm-pod1:
25             <<: *brahmaputra
26 #--------------------------------
27 #        master
28 #--------------------------------
29 # No master deploys for now
30 #        - arm-pod1:
31 #            <<: *master
32 #--------------------------------
33 #       scenarios
34 #--------------------------------
35     scenario:
36         # HA scenarios
37         - 'os-odl_l2-nofeature-ha':
38             auto-trigger-name: 'armband-{scenario}-{pod}-{stream}-trigger'
39
40         # NOHA scenarios
41         - 'os-odl_l2-nofeature-noha':
42             auto-trigger-name: 'daily-trigger-disabled'
43
44     jobs:
45         - 'armband-{scenario}-{pod}-daily-{stream}'
46         - 'armband-deploy-{pod}-daily-{stream}'
47
48 ########################
49 # job templates
50 ########################
51 - job-template:
52     name: 'armband-{scenario}-{pod}-daily-{stream}'
53
54     concurrent: false
55
56     properties:
57         - throttle:
58             enabled: true
59             max-total: 1
60             max-per-node: 1
61             option: 'project'
62         - build-blocker:
63             use-build-blocker: true
64             blocking-jobs:
65                 - 'armband-os-.*?-{pod}-daily-{stream}'
66             block-level: 'NODE'
67
68     wrappers:
69         - build-name:
70             name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
71
72     triggers:
73         - '{auto-trigger-name}'
74
75     parameters:
76         - project-parameter:
77             project: '{project}'
78         - '{installer}-defaults'
79         - '{pod}-defaults':
80             installer: '{installer}'
81         - string:
82             name: DEPLOY_SCENARIO
83             default: '{scenario}'
84         - armband-ci-parameter:
85             gs-pathname: '{gs-pathname}'
86
87     builders:
88         - trigger-builds:
89             - project: 'armband-deploy-{pod}-daily-{stream}'
90               current-parameters: false
91               predefined-parameters:
92                 DEPLOY_SCENARIO={scenario}
93               same-node: true
94               block: true
95         - trigger-builds:
96             - project: 'functest-{installer}-{pod}-daily-{stream}'
97               current-parameters: false
98               predefined-parameters:
99                 DEPLOY_SCENARIO={scenario}
100               block: true
101               same-node: true
102               block-thresholds:
103                 build-step-failure-threshold: 'never'
104                 failure-threshold: 'never'
105                 unstable-threshold: 'FAILURE'
106
107 - job-template:
108     name: 'armband-deploy-{pod}-daily-{stream}'
109
110     concurrent: false
111
112     properties:
113         - throttle:
114             enabled: true
115             max-total: 1
116             max-per-node: 1
117             option: 'project'
118         - build-blocker:
119             use-build-blocker: true
120             blocking-jobs:
121                 - 'armband-deploy-{pod}-daily-{stream}'
122                 - 'armband-deploy-generic-daily-.*'
123             block-level: 'NODE'
124
125     parameters:
126         - project-parameter:
127             project: '{project}'
128         - '{installer}-defaults'
129         - '{pod}-defaults':
130             installer: '{installer}'
131         - string:
132             name: DEPLOY_SCENARIO
133             default: 'os-odl_l2-nofeature-ha'
134         - armband-ci-parameter:
135             gs-pathname: '{gs-pathname}'
136
137     scm:
138         - git-scm:
139             credentials-id: '{ssh-credentials}'
140             refspec: ''
141             branch: '{branch}'
142
143     wrappers:
144         - build-name:
145             name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
146
147     builders:
148         - shell:
149             !include-raw-escape: ./armband-download-artifact.sh
150         - shell:
151             !include-raw-escape: ./armband-deploy.sh
152
153     publishers:
154         - email:
155             recipients: josep.puigdemont@enea.com armband@enea.com
156
157 ########################
158 # parameter macros
159 ########################
160 - parameter:
161     name: armband-ci-parameter
162     parameters:
163         - string:
164             name: BUILD_DIRECTORY
165             default: $WORKSPACE/build_output
166             description: "Directory where the build artifact will be located upon the completion of the build."
167         - string:
168             name: CACHE_DIRECTORY
169             default: $HOME/opnfv/cache/$INSTALLER_TYPE
170             description: "Directory where the cache to be used during the build is located."
171         - string:
172             name: GS_URL
173             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
174             description: "URL to Google Storage."
175
176 ########################
177 # trigger macros
178 ########################
179 # CI PODs
180 #----------------------------------------------------------
181 # Enea Armband POD 1 Triggers running against master branch
182 #----------------------------------------------------------
183 # No triggers for master for now
184 - trigger:
185     name: 'armband-os-odl_l2-nofeature-ha-arm-pod1-master-trigger'
186     triggers:
187         - timed: ''
188
189 #---------------------------------------------------------------
190 # Enea Armband POD 1 Triggers running against brahmaputra branch
191 #---------------------------------------------------------------
192 - trigger:
193     name: 'armband-os-odl_l2-nofeature-ha-arm-pod1-brahmaputra-trigger'
194     triggers:
195         - timed: '0 18 * * *'