blob: bcae2de929a3e16505c2018ac414d6e7f80fdce5 [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
Bob Lantzeb36a4e2014-09-25 18:17:33 -070018 - ansicolor
Brian O'Connoraa7950f2014-09-20 00:58:52 -070019
Brian O'Connor9cf37152014-09-20 01:49:22 -070020# ---- Mininet Build and Test Jobs ----
21- project:
22 name: mininet-build
Bob Lantz933c4a22014-09-22 17:27:37 -070023 flavor:
24 - precise32server
25 - precise64server
26 - trusty32server
27 - trusty64server
28 - utopic32server
29 - utopic64server
Brian O'Connor9cf37152014-09-20 01:49:22 -070030 jobs:
Bob Lantz933c4a22014-09-22 17:27:37 -070031 - 'mininet-{flavor}'
Bob Lantz933c4a22014-09-22 17:27:37 -070032 - 'mininet-{flavor}-test'
Brian O'Connor9cf37152014-09-20 01:49:22 -070033
34- job-template:
35 name: 'mininet-{flavor}'
36 block-downstream: true
Brian O'Connord0ad16e2014-09-20 00:07:08 -070037 triggers:
38 - timed: "@midnight"
39 builders:
Bob Lantz3f2c36d2014-09-25 19:01:47 -070040 - shell: "set -o pipefail; ~mininet/mininet/util/vm/build.py -v --test sanity {flavor} | tr '\r' ' '"
Brian O'Connord0ad16e2014-09-20 00:07:08 -070041 publishers:
Brian O'Connor73666062014-09-20 02:29:13 -070042 - archive:
Brian O'Connor74b9c232014-09-20 04:01:46 -070043 artifacts: '**'
Brian O'Connord0ad16e2014-09-20 00:07:08 -070044 - trigger-parameterized-builds:
Brian O'Connor9cf37152014-09-20 01:49:22 -070045 - project: 'mininet-{flavor}-test'
Brian O'Connor3af0f482014-09-19 20:00:29 -070046 condition: SUCCESS
Brian O'Connor326d0422014-09-19 19:54:29 -070047 predefined-parameters: dir=$WORKSPACE
Brian O'Connor08c5b112014-09-19 19:10:17 -070048
Brian O'Connor9cf37152014-09-20 01:49:22 -070049- job-template:
50 name: 'mininet-{flavor}-test'
Brian O'Connor73666062014-09-20 02:29:13 -070051 parameters:
52 - string:
Bob Lantz933c4a22014-09-22 17:27:37 -070053 name: dir
Brian O'Connor73666062014-09-20 02:29:13 -070054 default: /var/lib/jenkins/jobs/mininet-{flavor}/workspace
55 description: "$dir defaults to last build when using Build Now."
Brian O'Connord0ad16e2014-09-20 00:07:08 -070056 builders:
Bob Lantz3f2c36d2014-09-25 19:01:47 -070057 - shell: "echo $dir"
58 - shell: "set -o pipefail; ~mininet/mininet/util/vm/build.py -v --test core --image $dir/*/*.vmdk | tr '\r' ' '"
Bob Lantzbe321b62014-09-25 17:16:25 -070059 publishers:
60 - logparser:
Bob Lantz17ba9c82014-09-25 17:36:11 -070061 parse-rules: "/home/mininet/vm-build/mininet-test.rules"
Bob Lantzbe321b62014-09-25 17:16:25 -070062 unstable-on-warning: false
63 fail-on-error: true
Brian O'Connor65f99852014-09-19 23:14:03 -070064
65# ---- the following are jobs that update jenkins when this file is updated ----
Brian O'Connor01303d42014-09-19 18:10:58 -070066- job:
Brian O'Connor82792082014-09-19 18:59:43 -070067 name: update-jenkins-jobs
Brian O'Connor380c2522014-09-20 00:12:40 -070068 description: |
Bob Lantz6f806722014-09-22 18:13:47 -070069 This job updates Jenkins jobs automatically when updates are made to the YAML file.
Brian O'Connor380c2522014-09-20 00:12:40 -070070
71 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 -070072 scm:
73 - git:
74 url: ssh://jenkins@gerrit.onlab.us:29418/vm-build
75 branches:
76 - master
77 browser: gitweb
78 browser-url: https://gerrit.onlab.us/gitweb?p=vm-build.git
79 timeout: 20
80 triggers:
Brian O'Connor4e72d842014-09-19 18:20:04 -070081 - gerrit:
Brian O'Connor01303d42014-09-19 18:10:58 -070082 trigger-on-ref-updated-event: true
83 trigger-on-change-merged-event: true
84 projects:
85 - project-compare-type: 'PLAIN'
86 project-pattern: 'vm-build'
87 branches:
88 - branch-compare-type: 'PLAIN'
89 branch-pattern: 'master'
Brian O'Connor4e72d842014-09-19 18:20:04 -070090 silent: true
Brian O'Connor01303d42014-09-19 18:10:58 -070091 builders:
92 - shell: "jenkins-jobs --conf /var/lib/jenkins/jenkins_jobs.conf update jobs.yaml"
Brian O'Connorc990f872014-09-19 18:21:25 -070093
94- job:
95 name: update-jenkins-verify
Brian O'Connor380c2522014-09-20 00:12:40 -070096 description: |
97 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 -070098 parameters:
99 - string:
100 name: GERRIT_REFSPEC
Bob Lantz933c4a22014-09-22 17:27:37 -0700101 default: refs/heads/master
Brian O'Connor73666062014-09-20 02:29:13 -0700102 description: "Use master as default when using Build Now."
Brian O'Connordb899fb2014-09-19 23:09:14 -0700103 scm:
104 - git:
105 url: ssh://jenkins@gerrit.onlab.us:29418/vm-build
Brian O'Connor73666062014-09-20 02:29:13 -0700106 refspec: $GERRIT_REFSPEC
Brian O'Connordb899fb2014-09-19 23:09:14 -0700107 branches:
108 - $GERRIT_BRANCH
109 browser: gitweb
110 browser-url: https://gerrit.onlab.us/gitweb?p=vm-build.git
Brian O'Connorc82eaf82014-09-20 03:28:50 -0700111 choosing-strategy: gerrit
Brian O'Connordb899fb2014-09-19 23:09:14 -0700112 timeout: 20
113 triggers:
114 - gerrit:
115 trigger-on-draft-published-event: true
116 trigger-on-patchset-uploaded-event: true
Brian O'Connor51c53d82014-09-19 23:19:42 -0700117 trigger-for-unreviewed-patches: true
Brian O'Connordb899fb2014-09-19 23:09:14 -0700118 projects:
119 - project-compare-type: 'PLAIN'
120 project-pattern: 'vm-build'
121 branches:
122 - branch-compare-type: 'PLAIN'
123 branch-pattern: 'master'
124 builders:
125 - shell: "jenkins-jobs test jobs.yaml"