blob: dad74b892fdf481523f1ed5482da476e709e7156 [file] [log] [blame]
Brian O'Connor9cf37152014-09-20 01:49:22 -07001- defaults:
2 name: global
Brian O'Connord0ad16e2014-09-20 00:07:08 -07003 project-type: freestyle
Brian O'Connor9cf37152014-09-20 01:49:22 -07004 description: |
Brian O'Connorc6aef8f2014-09-20 01:51:08 -07005 This is an auto-generated job.
Brian O'Connorc9449db2014-09-20 02:04:51 -07006
Brian O'Connor9cf37152014-09-20 01:49:22 -07007 To add or modify a job, look for the "vm-build" project on https://gerrit.onlab.us
Brian O'Connoraa7950f2014-09-20 00:58:52 -07008 logrotate:
Brian O'Connor73666062014-09-20 02:29:13 -07009 daysToKeep: 10
10 numToKeep: 10
11 artifactDaysToKeep: 5
12 artifactNumToKeep: 5
Brian O'Connorc9449db2014-09-20 02:04:51 -070013 wrappers:
14 - workspace-cleanup:
Bob Lantz933c4a22014-09-22 17:27:37 -070015 include:
Brian O'Connor1b803832014-09-20 02:13:48 -070016 - "*"
Brian O'Connorc9449db2014-09-20 02:04:51 -070017 dirmatch: true
Brian O'Connoraa7950f2014-09-20 00:58:52 -070018
Brian O'Connor9cf37152014-09-20 01:49:22 -070019# ---- Mininet Build and Test Jobs ----
20- project:
21 name: mininet-build
Bob Lantz933c4a22014-09-22 17:27:37 -070022 flavor:
23 - precise32server
24 - precise64server
25 - trusty32server
26 - trusty64server
27 - utopic32server
28 - utopic64server
Brian O'Connor9cf37152014-09-20 01:49:22 -070029 jobs:
Bob Lantz933c4a22014-09-22 17:27:37 -070030 - 'mininet-{flavor}'
Brian O'Connord0ad16e2014-09-20 00:07:08 -070031
Brian O'Connor9cf37152014-09-20 01:49:22 -070032- project:
33 name: mininet-test
Bob Lantz933c4a22014-09-22 17:27:37 -070034 flavor:
35 - precise32server
36 - precise64server
37 - trusty32server
38 - trusty64server
39 - utopic32server
40 - utopic64server
Brian O'Connor9cf37152014-09-20 01:49:22 -070041 jobs:
Bob Lantz933c4a22014-09-22 17:27:37 -070042 - 'mininet-{flavor}-test'
Brian O'Connor9cf37152014-09-20 01:49:22 -070043
44- job-template:
45 name: 'mininet-{flavor}'
46 block-downstream: true
Brian O'Connord0ad16e2014-09-20 00:07:08 -070047 triggers:
48 - timed: "@midnight"
49 builders:
Brian O'Connor9cf37152014-09-20 01:49:22 -070050 - shell: "~mininet/mininet/util/vm/build.py -v --test sanity {flavor}"
Brian O'Connord0ad16e2014-09-20 00:07:08 -070051 publishers:
Brian O'Connor73666062014-09-20 02:29:13 -070052 - archive:
Brian O'Connor74b9c232014-09-20 04:01:46 -070053 artifacts: '**'
Brian O'Connord0ad16e2014-09-20 00:07:08 -070054 - trigger-parameterized-builds:
Brian O'Connor9cf37152014-09-20 01:49:22 -070055 - project: 'mininet-{flavor}-test'
Brian O'Connor3af0f482014-09-19 20:00:29 -070056 condition: SUCCESS
Brian O'Connor326d0422014-09-19 19:54:29 -070057 predefined-parameters: dir=$WORKSPACE
Brian O'Connor08c5b112014-09-19 19:10:17 -070058
Brian O'Connor9cf37152014-09-20 01:49:22 -070059- job-template:
60 name: 'mininet-{flavor}-test'
Brian O'Connor73666062014-09-20 02:29:13 -070061 parameters:
62 - string:
Bob Lantz933c4a22014-09-22 17:27:37 -070063 name: dir
Brian O'Connor73666062014-09-20 02:29:13 -070064 default: /var/lib/jenkins/jobs/mininet-{flavor}/workspace
65 description: "$dir defaults to last build when using Build Now."
Brian O'Connord0ad16e2014-09-20 00:07:08 -070066 builders:
67 - shell: "echo $dir; ~mininet/mininet/util/vm/build.py -v --test core --image $dir/*/*.vmdk"
Brian O'Connor65f99852014-09-19 23:14:03 -070068
69# ---- the following are jobs that update jenkins when this file is updated ----
Brian O'Connor01303d42014-09-19 18:10:58 -070070- job:
Brian O'Connor82792082014-09-19 18:59:43 -070071 name: update-jenkins-jobs
Brian O'Connor380c2522014-09-20 00:12:40 -070072 description: |
Bob Lantz6f806722014-09-22 18:13:47 -070073 This job updates Jenkins jobs automatically when updates are made to the YAML file.
Brian O'Connor380c2522014-09-20 00:12:40 -070074
75 To add or modify a job, look for the "vm-build" project on https://gerrit.onlab.us
Brian O'Connor01303d42014-09-19 18:10:58 -070076 scm:
77 - git:
78 url: ssh://jenkins@gerrit.onlab.us:29418/vm-build
79 branches:
80 - master
81 browser: gitweb
82 browser-url: https://gerrit.onlab.us/gitweb?p=vm-build.git
83 timeout: 20
84 triggers:
Brian O'Connor4e72d842014-09-19 18:20:04 -070085 - gerrit:
Brian O'Connor01303d42014-09-19 18:10:58 -070086 trigger-on-ref-updated-event: true
87 trigger-on-change-merged-event: true
88 projects:
89 - project-compare-type: 'PLAIN'
90 project-pattern: 'vm-build'
91 branches:
92 - branch-compare-type: 'PLAIN'
93 branch-pattern: 'master'
Brian O'Connor4e72d842014-09-19 18:20:04 -070094 silent: true
Brian O'Connor01303d42014-09-19 18:10:58 -070095 builders:
96 - shell: "jenkins-jobs --conf /var/lib/jenkins/jenkins_jobs.conf update jobs.yaml"
Brian O'Connorc990f872014-09-19 18:21:25 -070097
98- job:
99 name: update-jenkins-verify
Brian O'Connor380c2522014-09-20 00:12:40 -0700100 description: |
101 This job is used to verify new Jenkins jobs using jenkins-job test before they are accepted in Gerrit.
Brian O'Connor73666062014-09-20 02:29:13 -0700102 parameters:
103 - string:
104 name: GERRIT_REFSPEC
Bob Lantz933c4a22014-09-22 17:27:37 -0700105 default: refs/heads/master
Brian O'Connor73666062014-09-20 02:29:13 -0700106 description: "Use master as default when using Build Now."
Brian O'Connordb899fb2014-09-19 23:09:14 -0700107 scm:
108 - git:
109 url: ssh://jenkins@gerrit.onlab.us:29418/vm-build
Brian O'Connor73666062014-09-20 02:29:13 -0700110 refspec: $GERRIT_REFSPEC
Brian O'Connordb899fb2014-09-19 23:09:14 -0700111 branches:
112 - $GERRIT_BRANCH
113 browser: gitweb
114 browser-url: https://gerrit.onlab.us/gitweb?p=vm-build.git
Brian O'Connorc82eaf82014-09-20 03:28:50 -0700115 choosing-strategy: gerrit
Brian O'Connordb899fb2014-09-19 23:09:14 -0700116 timeout: 20
117 triggers:
118 - gerrit:
119 trigger-on-draft-published-event: true
120 trigger-on-patchset-uploaded-event: true
Brian O'Connor51c53d82014-09-19 23:19:42 -0700121 trigger-for-unreviewed-patches: true
Brian O'Connordb899fb2014-09-19 23:09:14 -0700122 projects:
123 - project-compare-type: 'PLAIN'
124 project-pattern: 'vm-build'
125 branches:
126 - branch-compare-type: 'PLAIN'
127 branch-pattern: 'master'
128 builders:
129 - shell: "jenkins-jobs test jobs.yaml"