yardstick: Create jobs for Euphrates
[releng.git] / jjb / yardstick / yardstick-project-jobs.yml
1 ###################################################
2 # All the jobs except verify have been removed!
3 # They will only be enabled on request by projects!
4 ###################################################
5 - project:
6     name: yardstick-project-jobs
7
8     project: 'yardstick'
9
10     jobs:
11         - 'yardstick-verify-{stream}'
12         - 'yardstick-merge-{stream}'
13
14     stream:
15         - master:
16             branch: '{stream}'
17             gs-pathname: ''
18             disabled: false
19         - euphrates:
20             branch: 'stable/{stream}'
21             gs-pathname: '/{stream}'
22             disabled: false
23
24 ################################
25 # job templates
26 ################################
27
28 - job-template:
29     name: 'yardstick-verify-{stream}'
30
31     disabled: '{obj:disabled}'
32
33     parameters:
34         - project-parameter:
35             project: '{project}'
36             branch: '{branch}'
37         - 'opnfv-build-ubuntu-defaults'
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                 - draft-published-event
51                 - comment-added-contains-event:
52                     comment-contains-value: 'recheck'
53                 - comment-added-contains-event:
54                     comment-contains-value: 'reverify'
55             projects:
56               - project-compare-type: 'ANT'
57                 project-pattern: '{project}'
58                 branches:
59                   - branch-compare-type: 'ANT'
60                     branch-pattern: '**/{branch}'
61
62     wrappers:
63         - ssh-agent-wrapper
64         - timeout:
65             timeout: 30
66             fail: true
67
68     builders:
69         - yardstick-unit-tests-and-docs-build
70
71 - job-template:
72     name: 'yardstick-merge-{stream}'
73
74     disabled: '{obj:disabled}'
75
76     parameters:
77         - project-parameter:
78             project: '{project}'
79             branch: '{branch}'
80         - 'opnfv-build-ubuntu-defaults'
81         - string:
82             name: GS_URL
83             default: '$GS_BASE{gs-pathname}'
84             description: "Directory where the build artifact will be located upon the completion     of the build."
85
86     scm:
87         - git-scm
88
89     triggers:
90         - gerrit:
91             server-name: 'gerrit.opnfv.org'
92             trigger-on:
93                 - change-merged-event
94                 - comment-added-contains-event:
95                     comment-contains-value: 'remerge'
96             projects:
97               - project-compare-type: 'ANT'
98                 project-pattern: '{project}'
99                 branches:
100                     - branch-compare-type: 'ANT'
101                       branch-pattern: '**/{branch}'
102
103     wrappers:
104         - ssh-agent-wrapper
105         - timeout:
106             timeout: 30
107             fail: true
108
109     builders:
110         - yardstick-unit-tests-and-docs-build
111
112 ################################
113 # job builders
114 ################################
115
116 - builder:
117     name: yardstick-unit-tests-and-docs-build
118     builders:
119         - shell: |
120             #!/bin/bash
121             set -o errexit
122             set -o pipefail
123
124             sudo apt-get install -y build-essential python-dev python3-dev
125
126             echo "Running unit tests..."
127             cd $WORKSPACE
128             tox