Add Project Option to Throttle Property
[releng.git] / jjb / armband / armband-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: armband
7
8     project: '{name}'
9
10     jobs:
11         - 'armband-verify-{stream}'
12         - 'armband-build-daily-{stream}'
13
14     stream:
15         - master:
16             branch: '{stream}'
17             gs-pathname: ''
18         - brahmaputra:
19             branch: 'stable/{stream}'
20             gs-pathname: '/{stream}'
21
22 - job-template:
23     name: 'armband-verify-{stream}'
24
25     parameters:
26         - project-parameter:
27             project: '{project}'
28         - gerrit-parameter:
29             branch: '{branch}'
30         - 'opnfv-build-ubuntu-defaults'
31
32     scm:
33         - gerrit-trigger-scm:
34             credentials-id: '{ssh-credentials}'
35             refspec: '$GERRIT_REFSPEC'
36             choosing-strategy: 'gerrit'
37
38     triggers:
39         - gerrit:
40             trigger-on:
41                 - patchset-created-event:
42                     exclude-drafts: 'false'
43                     exclude-trivial-rebase: 'false'
44                     exclude-no-code-change: 'false'
45                 - draft-published-event
46                 - comment-added-contains-event:
47                     comment-contains-value: 'recheck'
48                 - comment-added-contains-event:
49                     comment-contains-value: 'reverify'
50             projects:
51               - project-compare-type: 'ANT'
52                 project-pattern: '{project}'
53                 branches:
54                   - branch-compare-type: 'ANT'
55                     branch-pattern: '**/{branch}'
56                 forbidden-file-paths:
57                   - compare-type: ANT
58                     pattern: 'docs/**|.gitignore'
59
60     builders:
61         - shell: |
62             echo "Nothing to verify!"
63
64 - job-template:
65     name: 'armband-build-daily-{stream}'
66
67     concurrent: false
68
69     properties:
70         - throttle:
71             enabled: true
72             max-total: 1
73             max-per-node: 1
74             option: 'project'
75
76     parameters:
77         - project-parameter:
78             project: '{project}'
79         - 'arm-build1-defaults'
80         - armband-project-parameter:
81             gs-pathname: '{gs-pathname}'
82
83     scm:
84         - git-scm:
85             credentials-id: '{ssh-credentials}'
86             refspec: ''
87             branch: '{branch}'
88
89     triggers:
90         - pollscm:
91             cron: '0 H/4 * * *'
92
93     wrappers:
94         - timeout:
95             timeout: 360
96             fail: true
97
98     builders:
99         - shell:
100             !include-raw-escape: ./build.sh
101         - shell:
102             !include-raw-escape: ./upload-artifacts.sh
103
104     publishers:
105         - email:
106             recipients: josep.puigdemont@enea.com armband@enea.com
107
108 ########################
109 # parameter macros
110 ########################
111 - parameter:
112     name: armband-project-parameter
113     parameters:
114         - string:
115             name: BUILD_DIRECTORY
116             default: $WORKSPACE/build_output
117             description: "Directory where the build artifact will be located upon the completion of the build."
118         - string:
119             name: GS_URL
120             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
121             description: "URL to Google Storage."
122         - choice:
123             name: FORCE_BUILD
124             choices:
125                 - 'false'
126                 - 'true'
127             description: 'Force build even if there are no changes in the armband repo. Default false'