engine: Run tox job first before running anything else
[infra/cicd.git] / jjb / engine / verify-jobs / engine-verify-package.yaml
1 ---
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2019 Nordix Foundation.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19
20 - project:
21     name: 'engine-verify-package'
22
23     project: 'engine-verify-package'
24
25     stream:
26       - 'master':
27           branch: '{stream}'
28           openrc-credentials-file: 'est-jenkins-openrcfile-city-karlskrona-onap'
29           execution-mode: 'packaging'
30           gated-projects: 'infra\/engine'
31           successful: false
32           failed: false
33           unstable: false
34           notbuilt: false
35
36     distro:
37       - ubuntu1804
38
39     jobs:
40       - 'engine-verify-package-{distro}-{stream}'
41
42 - job-template:
43     name: 'engine-verify-package-{distro}-{stream}'
44
45     disabled: '{obj:disabled}'
46
47     concurrent: true
48
49     parameters:
50       - string:
51           name: EXECUTION_MODE
52           default: '{execution-mode}'
53           description: 'Engine execution mode - packaging'
54       - string:
55           name: DISTRO
56           default: '{distro}'
57           description: 'Distribution to use for configuring target nodes (networking etc.)'
58       - string:
59           name: VERBOSITY
60           default: 'true'
61           description: 'Verbosity setting for the engine - true or false - default is false'
62       - string:
63           name: ARTIFACTS_TO_UPLOAD
64           default: "k8s-installer-ubuntu1804.bsx"
65           description: 'Artifacts to upload'
66       - string:
67           name: NORDIX_ARM_PUBLIC_IP
68           default: '91.106.198.25'
69           description: 'Public IP of Nordix Artifactory. Offline deployments can not resolve domain name'
70       - string:
71           name: NORDIX_ARM_HTTPS_URL
72           default: 'https://artifactory.nordix.org/artifactory'
73           description: 'URL to Nordix Artifactory'
74       - string:
75           name: NORDIX_ARM_REPO
76           default: 'nordix-kubernetes'
77           description: 'Name of the repository to upload and download artifact to/from. Depends on the stack'
78       - string:
79           name: CI_LOOP
80           default: 'verify'
81           description: 'CI loop type'
82       - label:
83           name: SLAVE_LABEL
84           default: 'engine-master-offline-{distro}'
85           description: 'Slave label to schedule this job on.'
86       - project-parameters:
87           project: $GERRIT_PROJECT
88           branch: '{branch}'
89           description: 'The project and branch which the change is proposed for'
90       - nordix-gerrit-parameters
91
92     properties:
93       - logrotate
94       - throttle:
95           max-per-node: 1
96           max-total: 3
97           option: project
98
99     wrappers:
100       - build-timeout:
101           timeout: 180
102       - mask-passwords
103       - fix-workspace-permissions
104       - openstack:
105           single-use: True
106
107     scm:
108       - git-scm-gerrit:
109           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
110           branch: '{branch}'
111           refspec: $GERRIT_REFSPEC
112           wipe_workspace: true
113           clean_before: false
114
115     triggers:
116       - gerrit:
117           server-name: 'Nordix Gerrit'
118           trigger-on:
119             - patchset-created-event:
120                 exclude-drafts: 'false'
121                 exclude-trivial-rebase: 'false'
122                 exclude-no-code-change: 'false'
123             - draft-published-event
124             - comment-added-contains-event:
125                 comment-contains-value: 'recheck'
126             - comment-added-contains-event:
127                 comment-contains-value: 'reverify'
128           projects:
129             - project-compare-type: 'REG_EXP'
130               project-pattern: '{gated-projects}'
131               branches:
132                 - branch-compare-type: 'ANT'
133                   branch-pattern: '**/{branch}'
134               disable-strict-forbidden-file-verification: 'true'
135               forbidden-file-paths:
136                 - compare-type: ANT
137                   pattern: 'docs/**|releasenotes/**'
138           skip-vote:
139             successful: '{obj:successful}'
140             failed: '{obj:failed}'
141             unstable: '{obj:unstable}'
142             notbuilt: '{obj:notbuilt}'
143           custom-url: '* $JOB_NAME $BUILD_URL'
144           readable-message: 'true'
145           dependency-jobs: 'engine-verify-tox-{stream}'
146
147     wrappers:
148       - build-timeout:
149           timeout: 70
150       - credentials-binding:
151           - username-password-separated:
152               credential-id: 'nordix-cicd-arm-credentials'
153               username: NORDIX_ARM_USERNAME
154               password: NORDIX_ARM_TOKEN
155       - mask-passwords
156       - fix-workspace-permissions
157
158     builders:
159       - 'generate-ssh-keypair-macro'
160       - 'wait-pkg-mgr-macro'
161       - 'package-macro'
162       - 'upload-artifact-macro'