Merge "Adding a new verification job for testapi UI."
[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
20     jobs:
21       - 'releng-release-{stream}-verify'
22       - 'releng-release-{stream}-merge'
23
24     project: 'releng'
25
26 - job-template:
27     name: 'releng-release-{stream}-verify'
28
29     parameters:
30       - '{build-node}-defaults'
31       - stream-parameter:
32           stream: '{stream}'
33       - project-parameter:
34           project: '{project}'
35           branch: 'master'
36
37     scm:
38       - git-scm-gerrit
39
40     triggers:
41       - gerrit:
42           server-name: 'gerrit.opnfv.org'
43           trigger-on:
44             - patchset-created-event:
45                 exclude-drafts: 'false'
46                 exclude-trivial-rebase: 'false'
47                 exclude-no-code-change: 'false'
48             - comment-added-contains-event:
49                 comment-contains-value: 'recheck'
50             - comment-added-contains-event:
51                 comment-contains-value: 'reverify'
52           projects:
53             - project-compare-type: 'ANT'
54               project-pattern: 'releng'
55               branches:
56                 - branch-compare-type: 'ANT'
57                   branch-pattern: '**/master'
58               file-paths:
59                 - compare-type: ANT
60                   pattern: 'releases/{stream}/**'
61                 - compare-type: ANT
62                   pattern: 'releases/schema.yaml'
63                 - compare-type: ANT
64                   pattern: 'releases/scripts/verify_schema.py'
65
66     builders:
67       - shell: !include-raw-escape:
68           - releng-release-create-venv.sh
69           - releng-release-tagging.sh
70
71     publishers:
72       - email-jenkins-admins-on-failure
73
74 - job-template:
75     name: 'releng-release-{stream}-merge'
76
77     parameters:
78       - node:
79           name: SLAVE_NAME
80           description: 'Only run merge job on build1'
81           default-slaves:
82             - lf-build1
83           allowed-multiselect: false
84           ignore-offline-nodes: true
85       - stream-parameter:
86           stream: '{stream}'
87       - project-parameter:
88           project: '{project}'
89           branch: 'master'
90       # Override GIT_URL so we can send patches back to Gerrit and
91       # modify repos
92       - string:
93           name: GIT_URL
94           default: ssh://$USER@gerrit.opnfv.org:29418/
95           description: 'Git URL to use on this Jenkins Slave'
96
97     scm:
98       - git-scm-gerrit
99
100     triggers:
101       - gerrit-trigger-change-merged:
102           project: '{project}'
103           branch: 'master'
104           files: 'releases/{stream}/*'
105
106     builders:
107       - shell: !include-raw-escape:
108           - releng-release-create-venv.sh
109           - releng-release-tagging.sh
110           - releng-release-create-branch.sh
111
112     publishers:
113       - email-jenkins-admins-on-failure
114
115 - parameter:
116     name: stream-parameter
117     parameters:
118       - string:
119           name: STREAM
120           default: '{stream}'
121           description: "OPNFV Stable Stream"