Rewrite Xtesting verification job
[releng.git] / jjb / releng / releng-release-jobs.yaml
1 # SPDX-License-Identifier: Apache-2.0
2 ##############################################################################
3 # Copyright (c) 2018 The Linux Foundation and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 ---
10 - project:
11     name: releng-release-jobs
12
13     build-node: 'opnfv-build'
14
15     stream:
16       - fraser
17       - gambia
18       - hunter
19       - iruya
20       - jerma
21
22     jobs:
23       - 'releng-release-{stream}-verify'
24       - 'releng-release-{stream}-merge'
25
26     project: 'releng'
27
28 - job-template:
29     name: 'releng-release-{stream}-verify'
30
31     parameters:
32       - '{build-node}-defaults'
33       - stream-parameter:
34           stream: '{stream}'
35       - project-parameter:
36           project: '{project}'
37           branch: 'master'
38
39     scm:
40       - git-scm-gerrit
41
42     triggers:
43       - gerrit:
44           server-name: 'gerrit.opnfv.org'
45           trigger-on:
46             - patchset-created-event:
47                 exclude-drafts: 'false'
48                 exclude-trivial-rebase: 'false'
49                 exclude-no-code-change: 'false'
50             - comment-added-contains-event:
51                 comment-contains-value: 'recheck'
52             - comment-added-contains-event:
53                 comment-contains-value: 'reverify'
54           projects:
55             - project-compare-type: 'ANT'
56               project-pattern: 'releng'
57               branches:
58                 - branch-compare-type: 'ANT'
59                   branch-pattern: '**/master'
60               file-paths:
61                 - compare-type: ANT
62                   pattern: 'releases/{stream}/**'
63                 - compare-type: ANT
64                   pattern: 'releases/schema.yaml'
65                 - compare-type: ANT
66                   pattern: 'releases/scripts/verify_schema.py'
67
68     builders:
69       - shell: !include-raw-escape:
70           - releng-release-create-venv.sh
71           - branch-or-tag.sh
72
73     publishers:
74       - email-jenkins-admins-on-failure
75
76 - job-template:
77     name: 'releng-release-{stream}-merge'
78
79     parameters:
80       - node:
81           name: SLAVE_NAME
82           description: 'Only run merge job on build1'
83           default-slaves:
84             - lf-build1
85           allowed-multiselect: false
86           ignore-offline-nodes: true
87       - stream-parameter:
88           stream: '{stream}'
89       - project-parameter:
90           project: '{project}'
91           branch: 'master'
92       # Override GIT_URL so we can send patches back to Gerrit and
93       # modify repos
94       - string:
95           name: GIT_URL
96           default: ssh://$USER@gerrit.opnfv.org:29418/
97           description: 'Git URL to use on this Jenkins Slave'
98
99     scm:
100       - git-scm-gerrit
101
102     triggers:
103       - gerrit-trigger-change-merged:
104           project: '{project}'
105           branch: 'master'
106           files: 'releases/{stream}/*'
107
108     builders:
109       - shell: !include-raw-escape:
110           - releng-release-create-venv.sh
111           - branch-or-tag.sh
112
113     publishers:
114       - email-jenkins-admins-on-failure
115
116 - parameter:
117     name: stream-parameter
118     parameters:
119       - string:
120           name: STREAM
121           default: '{stream}'
122           description: "OPNFV Stable Stream"