Add compass task for iec CI/CD in community
[ci-management.git] / jjb / iec / iec.yaml
1 ---
2 - project:
3     name: 'iec'
4     project-name: 'iec'
5     project: '{project-name}'
6     views:
7       - project-view
8     # -------------------------------
9     # BRANCH DEFINITIONS
10     # -------------------------------
11     stream:
12       - master:
13           branch: '{stream}'
14           gs-pathname: ''
15           disabled: false
16
17     # -------------------------------
18     # DEPLOY TYPE DEFINITIONS
19     # -------------------------------
20     deploy-type:
21       - fuel-baremetal:
22           slave-label: 'aarch64_dev'
23           scenario: 'k8-calico-iec-noha'
24       - fuel-virtual:
25           slave-label: 'aarch64_dev'
26           scenario: 'k8-calico-iec-noha'
27       - compass-virtual:
28           slave-label: 'aarch64_dev'
29           scenario: 'k8-calico-iec-noha'
30
31     jobs:
32       - 'iec-{deploy-type}-daily-{stream}'
33       - 'iec-deploy-{deploy-type}-daily-{stream}'
34
35 ##############
36 # PARAMETERS #
37 ##############
38 - parameter:
39     name: 'iec-defaults'
40     parameters:
41       - string:
42           name: INSTALLER_IP
43           default: '10.20.0.2'
44           description: 'IP of the installer'
45       - string:
46           name: SSH_KEY
47           default: "/var/lib/opnfv/mcp.rsa"
48           description: 'Path to private SSH key to access environment nodes'
49       - string:
50           name: EXTERNAL_NETWORK
51           default: 'floating_net'
52           description: 'external network for test'
53       - string:
54           name: CI_DEBUG
55           default: 'false'
56           description: "Show debug output information"
57
58 ########################
59 # job templates
60 ########################
61 - job-template:
62     name: 'iec-{deploy-type}-daily-{stream}'
63     disabled: '{obj:disabled}'
64     concurrent: false
65     node: '{slave-label}'
66     properties:
67       - throttle:
68           enabled: true
69           max-total: 4
70           max-per-node: 1
71           option: 'project'
72       - build-blocker:
73           use-build-blocker: true
74           blocking-jobs:
75             - '.*-{deploy-type}-daily-.*'
76           blocking-level: 'NODE'
77
78     wrappers:
79       - build-name:
80           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
81
82     triggers:
83       - 'iec-{deploy-type}-daily-{stream}-trigger'
84
85     parameters:
86       - lf-infra-parameters:
87           project: '{project}'
88           stream: '{stream}'
89           branch: '{branch}'
90       - '{project}-defaults'
91       - string:
92           name: DEPLOY_SCENARIO
93           default: 'k8-calico-iec-noha'
94
95     builders:
96       - trigger-builds:
97           - project: 'iec-deploy-{deploy-type}-daily-{stream}'
98             current-parameters: false
99             predefined-parameters: |
100               DEPLOY_SCENARIO={scenario}
101               INSTALLER_VERSION={stream}
102             same-node: true
103             block: true
104
105 - job-template:
106     name: 'iec-deploy-{deploy-type}-daily-{stream}'
107     concurrent: true
108     node: '{slave-label}'
109     properties:
110       - throttle:
111           enabled: true
112           max-total: 4
113           max-per-node: 1
114           option: 'project'
115       - build-blocker:
116           use-build-blocker: true
117           blocking-jobs:
118             - '.*-deploy-{deploy-type}-daily-*'
119           blocking-level: 'NODE'
120
121     parameters:
122       - lf-infra-parameters:
123           project: '{project}'
124           stream: '{stream}'
125           branch: '{branch}'
126       - '{project}-defaults'
127       - string:
128           name: DEPLOY_SCENARIO
129           default: 'k8-calico-iec-noha'
130
131     wrappers:
132       - build-name:
133           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
134
135     scm:
136       - git:
137           credentials-id: '{jenkins-ssh-credential}'
138           url: '{git-url}/{project}.git'
139           refspec: ''
140           branches:
141             - 'refs/heads/{branch}'
142           skip-tag: true
143           wipe-workspace: true
144           submodule:
145             disable: true
146             recursive: false
147             timeout: '{submodule-timeout}'
148           choosing-strategy: default
149
150     builders:
151       - description-setter:
152           description: "POD: $NODE_NAME"
153       - conditional-step:
154           condition-kind: regex-match
155           regex: 'compass-.*'
156           label: '{deploy-type}'
157           steps:
158             - shell:
159                 !include-raw-escape: ./iec-compass-build.sh
160             - shell:
161                 !include-raw-escape: ./iec-compass-deploy.sh
162             - shell:
163                 !include-raw-escape: ./iec-compass-destroy.sh
164       - conditional-step:
165           condition-kind: regex-match
166           regex: 'fuel-.*'
167           label: '{deploy-type}'
168           steps:
169             - shell:
170                 !include-raw-escape: ./iec-fuel-deploy.sh
171
172     publishers:
173       - email:
174           recipients: armband@enea.com
175
176 ########################
177 # trigger macros
178 ########################
179 # CI PODs
180 # ----------------------------------------------------------------
181 # Akraino IEC CI Baremetal Triggers running against master branch
182 # ----------------------------------------------------------------
183 - trigger:
184     name: 'iec-fuel-virtual-daily-master-trigger'
185     triggers:
186       - timed: '0 1 * * *'
187 - trigger:
188     name: 'iec-fuel-baremetal-daily-master-trigger'
189     triggers:
190       - timed: ''
191 - trigger:
192     name: 'iec-compass-virtual-daily-master-trigger'
193     triggers:
194       - timed: '0 13 * * *'