19d6be80ef3847fc4631f686f62a3350b0375bba
[releng.git] / jjb / releng-jobs.yaml
1 - project:
2     name: builder-jobs
3     jobs:
4         - 'builder-verify-jjb'
5         - 'builder-merge'
6
7     project: 'releng'
8
9 - job-template:
10     name: builder-verify-jjb
11
12     project-type: freestyle
13
14     logrotate:
15         daysToKeep: 30
16         numToKeep: 10
17         artifactDaysToKeep: -1
18         artifactNumToKeep: -1
19
20     parameters:
21         - project-parameter:
22             project: '{project}'
23         - gerrit-parameter:
24             branch: 'master'
25     scm:
26         - gerrit-trigger-scm:
27             credentials-id: '{ssh-credentials}'
28             refspec: '$GERRIT_REFSPEC'
29             choosing-strategy: 'gerrit'
30
31     wrappers:
32         - ssh-agent-credentials:
33             user: '{ssh-credentials}'
34
35     triggers:
36         - gerrit:
37             trigger-on:
38                 - patchset-created-event:
39                     exclude-drafts: 'false'
40                     exclude-trivial-rebase: 'false'
41                     exclude-no-code-change: 'false'
42                 - draft-published-event
43                 - comment-added-contains-event:
44                     comment-contains-value: 'recheck'
45                 - comment-added-contains-event:
46                     comment-contains-value: 'reverify'
47             projects:
48               - project-compare-type: 'ANT'
49                 project-pattern: 'releng'
50                 branches:
51                   - branch-compare-type: 'ANT'
52                     branch-pattern: '**/master'
53                 file-paths:
54                     - compare-type: ANT
55                       pattern: jjb/**
56                     - compare-type: ANT
57                       pattern: jjb-templates/**
58
59
60     builders:
61         - shell: |
62             source /opt/virtualenv/jenkins-job-builder/bin/activate
63             jenkins-jobs test /opt/jenkins-ci/builder/
64
65 - job-template:
66     name: 'builder-merge'
67
68     # builder-merge job to run JJB update
69     #
70     # This job's purpose is to update all the JJB
71
72     project-type: freestyle
73
74     logrotate:
75         daysToKeep: 30
76         numToKeep: 40
77         artifactDaysToKeep: -1
78         artifactNumToKeep: 5
79
80     parameters:
81         - project-parameter:
82             project: '{project}'
83         - gerrit-parameter:
84             branch: 'master'
85
86     scm:
87         - gerrit-trigger-scm:
88             credentials-id: '{ssh-credentials}'
89             refspec: ''
90             choosing-strategy: 'default'
91
92     wrappers:
93         - ssh-agent-credentials:
94             user: '{ssh-credentials}'
95
96     triggers:
97         - gerrit:
98             trigger-on:
99                 - change-merged-event
100                 - comment-added-contains-event:
101                     comment-contains-value: 'remerge'
102             projects:
103               - project-compare-type: 'ANT'
104                 project-pattern: 'releng'
105                 branches:
106                     - branch-compare-type: 'ANT'
107                       branch-pattern: '**/master'
108                 file-paths:
109                     - compare-type: ANT
110                       pattern: jjb/**
111
112     builders:
113         - shell: |
114                 source /opt/virtualenv/jenkins-job-builder/bin/activate
115                 cd /opt/jenkins-ci/releng
116                 git pull
117                 jenkins-jobs update --delete-old jjb/
118