Switch to project type MultiJob for Joid and structure jobs accordingly
[releng.git] / jjb / joid / joid.yml
1 ########################
2 # Job configuration for joid
3 ########################
4 - project:
5
6     name: 'joid'
7
8     project: '{name}'
9
10     installer: 'joid'
11
12     sdn-controller:
13         - 'nosdn':
14             disabled: true
15         - 'odl':
16             disabled: false
17         - 'onos':
18             disabled: true
19         - 'opencontrail':
20             disabled: true
21
22     pod:
23         - 'intel-pod5'
24         - 'orange-pod2'
25
26 # only master branch is enabled at the moment to keep no of jobs sane
27     stream:
28         - master:
29             branch: '{stream}'
30             gs-pathname: ''
31 #        - brahmaputra:
32 #            branch: 'stable/{stream}'
33 #            gs-pathname: '{stream}'
34
35     jobs:
36         - 'joid-{sdn-controller}-{pod}-daily-{stream}'
37         - 'joid-deploy-{pod}-daily-{stream}'
38
39 ########################
40 # job templates
41 ########################
42 - job-template:
43     name: 'joid-{sdn-controller}-{pod}-daily-{stream}'
44
45     project-type: multijob
46
47     disabled: '{obj:disabled}'
48
49     concurrent: false
50
51     parameters:
52         - '{pod}-defaults'
53         - '{installer}-defaults'
54         - string:
55             name: SDN_CONTROLLER
56             default: '{sdn-controller}'
57         - string:
58             name: OPNFV_FEATURE
59             default: 'none'
60
61     scm:
62         - git-scm:
63             credentials-id: '{ssh-credentials}'
64             refspec: ''
65             branch: '{branch}'
66
67     builders:
68         - '{installer}-multijob-{pod}-builder'
69
70 - job-template:
71     name: 'joid-deploy-{pod}-daily-{stream}'
72
73     disabled: false
74
75     concurrent: false
76
77     wrappers:
78         - build-name:
79             name: '$BUILD_NUMBER: $INSTALLER_TYPE $SDN_CONTROLLER'
80
81     parameters:
82         - project-parameter:
83             project: '{project}'
84         - '{pod}-defaults'
85         - '{installer}-defaults'
86
87     scm:
88         - git-scm:
89             credentials-id: '{ssh-credentials}'
90             refspec: ''
91             branch: '{branch}'
92
93     builders:
94         - '{pod}-builder'
95
96 ########################
97 # multijob builder macros
98 ########################
99 # intel-pod5 is CI POD so full CI will run on it
100 # deploy, functest, yardstick
101 - builder:
102     name: joid-multijob-intel-pod5-builder
103     builders:
104         - multijob:
105             name: deploy
106             condition: SUCCESSFUL
107             projects:
108                 - name: 'joid-deploy-{pod}-daily-{stream}'
109                   current-parameters: true
110                   git-revision: true
111                   kill-phase-on: FAILURE
112         - multijob:
113             name: functest
114             condition: COMPLETED
115             projects:
116                 - name: 'functest-joid-{pod}-daily-{stream}'
117                   current-parameters: true
118                   kill-phase-on: NEVER
119 # yardstick placeholder
120 #        - multijob:
121 #            name: yardstick
122 #            condition: COMPLETED
123 #            projects:
124 #                - name: 'yardstick-joid-{pod}-daily-{stream}'
125 #                  current-parameters: true
126 #                  kill-phase-on: NEVER
127
128 # orange-pod2 is NOT a CI POD so only the selected jobs will run
129 # deploy and functest currently
130 - builder:
131     name: joid-multijob-orange-pod2-builder
132     builders:
133         - multijob:
134             name: deploy
135             condition: SUCCESSFUL
136             projects:
137                 - name: 'joid-deploy-{pod}-daily-{stream}'
138                   current-parameters: true
139                   git-revision: true
140                   kill-phase-on: FAILURE
141         - multijob:
142             name: functest
143             condition: COMPLETED
144             projects:
145                 - name: 'functest-joid-{pod}-daily-{stream}'
146                   current-parameters: true
147                   kill-phase-on: NEVER
148 ########################
149 # builder macros
150 ########################
151 - builder:
152     name: intel-pod5-builder
153     builders:
154         - shell: |
155             #!/bin/bash
156             echo "Running $INSTALLER_TYPE with controller $SDN_CONTROLLER"
157             echo "Please note that this is a quick try to see how joid deployment works"
158             echo
159             echo "Executing clean.sh"
160             cd $WORKSPACE/ci
161             ./clean.sh
162             echo
163             echo "Executing 02-maasdeploy.sh intelpod5"
164             ./02-maasdeploy.sh intelpod5
165             echo
166             echo "Executing deploy.sh -o liberty -s $SDN_CONTROLLER -t ha -l intelpod5"
167             ./deploy.sh -o liberty -s $SDN_CONTROLLER -t ha -l intelpod5
168
169 - builder:
170     name: orange-pod2-builder
171     builders:
172         - shell: |
173             #!/bin/bash
174             echo "Running $INSTALLER_TYPE with controller $SDN_CONTROLLER"
175             echo "Please note that this is WIP generic builder"
176             echo
177             echo "Executing clean.sh"
178             cd $WORKSPACE/ci
179             ./clean.sh
180         - shell:
181             !include-raw ./joid-deploy.sh