7d392414f19a31ad4de233295303f164ccb1447d
[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         - build-blocker:
62             use-build-blocker: true
63             blocking-jobs:
64                 - 'armband-os-.*?-{pod}-daily-{stream}'
65             block-level: 'NODE'
66
67     wrappers:
68         - build-name:
69             name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
70
71     triggers:
72         - '{auto-trigger-name}'
73
74     parameters:
75         - project-parameter:
76             project: '{project}'
77         - '{installer}-defaults'
78         - '{pod}-defaults':
79             installer: '{installer}'
80         - string:
81             name: DEPLOY_SCENARIO
82             default: '{scenario}'
83         - armband-ci-parameter:
84             gs-pathname: '{gs-pathname}'
85
86     builders:
87         - trigger-builds:
88             - project: 'armband-deploy-{pod}-daily-{stream}'
89               current-parameters: false
90               predefined-parameters:
91                 DEPLOY_SCENARIO={scenario}
92               same-node: true
93               block: true
94         - trigger-builds:
95             - project: 'functest-{installer}-{pod}-daily-{stream}'
96               current-parameters: false
97               predefined-parameters:
98                 DEPLOY_SCENARIO={scenario}
99               block: true
100               same-node: true
101               block-thresholds:
102                 build-step-failure-threshold: 'never'
103                 failure-threshold: 'never'
104                 unstable-threshold: 'FAILURE'
105
106 - job-template:
107     name: 'armband-deploy-{pod}-daily-{stream}'
108
109     concurrent: false
110
111     properties:
112         - throttle:
113             enabled: true
114             max-total: 1
115             max-per-node: 1
116         - build-blocker:
117             use-build-blocker: true
118             blocking-jobs:
119                 - 'armband-deploy-{pod}-daily-{stream}'
120                 - 'armband-deploy-generic-daily-.*'
121             block-level: 'NODE'
122
123     parameters:
124         - project-parameter:
125             project: '{project}'
126         - '{installer}-defaults'
127         - '{pod}-defaults':
128             installer: '{installer}'
129         - string:
130             name: DEPLOY_SCENARIO
131             default: 'os-odl_l2-nofeature-ha'
132         - armband-ci-parameter:
133             gs-pathname: '{gs-pathname}'
134
135     scm:
136         - git-scm:
137             credentials-id: '{ssh-credentials}'
138             refspec: ''
139             branch: '{branch}'
140
141     wrappers:
142         - build-name:
143             name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
144
145     builders:
146         - shell:
147             !include-raw-escape: ./armband-download-artifact.sh
148         - shell:
149             !include-raw-escape: ./armband-deploy.sh
150
151     publishers:
152         - email:
153             recipients: josep.puigdemont@enea.com armband@enea.com
154
155 ########################
156 # parameter macros
157 ########################
158 - parameter:
159     name: armband-ci-parameter
160     parameters:
161         - string:
162             name: BUILD_DIRECTORY
163             default: $WORKSPACE/build_output
164             description: "Directory where the build artifact will be located upon the completion of the build."
165         - string:
166             name: CACHE_DIRECTORY
167             default: $HOME/opnfv/cache/$INSTALLER_TYPE
168             description: "Directory where the cache to be used during the build is located."
169         - string:
170             name: GS_URL
171             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
172             description: "URL to Google Storage."
173
174 ########################
175 # trigger macros
176 ########################
177 # CI PODs
178 #----------------------------------------------------------
179 # Enea Armband POD 1 Triggers running against master branch
180 #----------------------------------------------------------
181 # No triggers for master for now
182 - trigger:
183     name: 'armband-os-odl_l2-nofeature-ha-arm-pod1-master-trigger'
184     triggers:
185         - timed: ''
186
187 #---------------------------------------------------------------
188 # Enea Armband POD 1 Triggers running against brahmaputra branch
189 #---------------------------------------------------------------
190 - trigger:
191     name: 'armband-os-odl_l2-nofeature-ha-arm-pod1-brahmaputra-trigger'
192     triggers:
193         - timed: '0 18 * * *'