blob: d5a7c8015ff3898edcfaced97fe1a6bede817115 [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
Bob Lantz312eeda2015-11-02 21:39:42 -08007 To add or modify a job, look for the "vm-build" project on https://gerrit.onosproject.org
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
Brian O'Connor685f2802014-11-25 12:14:42 -080023 jobs:
24 - 'mininet-latest'
25 - 'mininet-stable'
Bob Lantz388a2b42016-08-09 15:55:47 -070026 - 'mininet-2.2.2'
Brian O'Connor685f2802014-11-25 12:14:42 -080027
28- job-group:
29 name: mininet-latest
Bob Lantz933c4a22014-09-22 17:27:37 -070030 flavor:
Bob Lantz933c4a22014-09-22 17:27:37 -070031 - trusty32server
32 - trusty64server
Bob Lantz54c7f032016-08-01 16:05:57 -070033 - xenial32server
34 - xenial64server
Brian O'Connor685f2802014-11-25 12:14:42 -080035 branch: 'master'
36 tag: ''
Brian O'Connor9cf37152014-09-20 01:49:22 -070037 jobs:
Brian O'Connorfca243e2014-11-25 12:20:06 -080038 - 'mininet-{flavor}{tag}'
39 - 'mininet-{flavor}-test{tag}'
Brian O'Connor685f2802014-11-25 12:14:42 -080040
41- job-group:
42 name: mininet-stable
43 flavor:
44 - trusty32server
45 - trusty64server
Bob Lantzcc5ef5e2015-04-16 19:03:06 -070046 branch: '2.2.1'
Brian O'Connor685f2802014-11-25 12:14:42 -080047 tag: '-stable'
48 jobs:
Brian O'Connor685f2802014-11-25 12:14:42 -080049 - 'mininet-{flavor}{tag}'
50 - 'mininet-{flavor}-test{tag}'
Brian O'Connor9cf37152014-09-20 01:49:22 -070051
Bob Lantzc9f5a362016-08-09 15:40:11 -070052- job-group:
53 name: mininet-2.2.2
54 flavor:
55 - trusty32server
56 - trusty64server
57 - xenial32server
Bob Lantzb219cb42016-08-10 15:12:17 -070058 - xenial64server
Bob Lantzc9f5a362016-08-09 15:40:11 -070059 branch: 'devel/2.2.2'
60 tag: '-2.2.2'
61 jobs:
62 - 'mininet-{flavor}{tag}'
63 - 'mininet-{flavor}-test{tag}'
64
Brian O'Connor9cf37152014-09-20 01:49:22 -070065- job-template:
Brian O'Connor685f2802014-11-25 12:14:42 -080066 name: 'mininet-{flavor}{tag}'
Brian O'Connor9cf37152014-09-20 01:49:22 -070067 block-downstream: true
Brian O'Connord0ad16e2014-09-20 00:07:08 -070068 triggers:
69 - timed: "@midnight"
70 builders:
Bob Lantz6fc8e132016-01-13 23:23:19 -080071 - shell: stdbuf -oL -eL mispipe "sudo ~mininet/mininet/util/vm/build.py -v --branch {branch} --test sanity {flavor} --chown `whoami`" "tr '\r' ' '"
Bob Lantzb23a14d2014-10-01 16:49:23 -070072 - shell: zip `basename -s .ovf */*.ovf`.zip */*.vmdk */*.ovf
Bob Lantz5793de02017-01-17 16:29:48 -080073 - shell: shasum */*.vmdk */*.ovf */*.zip > `basename -s .ovf */*.ovf`.sha
Brian O'Connord0ad16e2014-09-20 00:07:08 -070074 publishers:
Brian O'Connor73666062014-09-20 02:29:13 -070075 - archive:
Brian O'Connor74b9c232014-09-20 04:01:46 -070076 artifacts: '**'
Bob Lantz825f3ee2014-09-25 20:08:10 -070077 - logparser:
78 parse-rules: "/home/mininet/vm-build/mininet-build.rules"
79 unstable-on-warning: false
80 fail-on-error: true
Brian O'Connord0ad16e2014-09-20 00:07:08 -070081 - trigger-parameterized-builds:
Brian O'Connorb8e63802014-11-25 13:51:09 -080082 - project: 'mininet-{flavor}-test{tag}'
Brian O'Connor3af0f482014-09-19 20:00:29 -070083 condition: SUCCESS
Brian O'Connor326d0422014-09-19 19:54:29 -070084 predefined-parameters: dir=$WORKSPACE
Brian O'Connor08c5b112014-09-19 19:10:17 -070085
Brian O'Connor9cf37152014-09-20 01:49:22 -070086- job-template:
Brian O'Connor685f2802014-11-25 12:14:42 -080087 name: 'mininet-{flavor}-test{tag}'
Brian O'Connor73666062014-09-20 02:29:13 -070088 parameters:
89 - string:
Bob Lantz933c4a22014-09-22 17:27:37 -070090 name: dir
Brian O'Connor73666062014-09-20 02:29:13 -070091 default: /var/lib/jenkins/jobs/mininet-{flavor}/workspace
92 description: "$dir defaults to last build when using Build Now."
Brian O'Connord0ad16e2014-09-20 00:07:08 -070093 builders:
Bob Lantz3f2c36d2014-09-25 19:01:47 -070094 - shell: "echo $dir"
Bob Lantz6fc8e132016-01-13 23:23:19 -080095 - shell: stdbuf -oL -eL mispipe "sudo ~mininet/mininet/util/vm/build.py -v --test core --test examplesfull --test walkthrough --image $dir/*/*.vmdk --memory 2048 --timeout 3600 --chown `whoami`" "tr '\r' ' '"
Bob Lantzbe321b62014-09-25 17:16:25 -070096 publishers:
97 - logparser:
Bob Lantz17ba9c82014-09-25 17:36:11 -070098 parse-rules: "/home/mininet/vm-build/mininet-test.rules"
Bob Lantzbe321b62014-09-25 17:16:25 -070099 unstable-on-warning: false
100 fail-on-error: true
Brian O'Connor65f99852014-09-19 23:14:03 -0700101
102# ---- the following are jobs that update jenkins when this file is updated ----
Brian O'Connor01303d42014-09-19 18:10:58 -0700103- job:
Brian O'Connor82792082014-09-19 18:59:43 -0700104 name: update-jenkins-jobs
Brian O'Connor380c2522014-09-20 00:12:40 -0700105 description: |
Bob Lantz6f806722014-09-22 18:13:47 -0700106 This job updates Jenkins jobs automatically when updates are made to the YAML file.
Brian O'Connor380c2522014-09-20 00:12:40 -0700107
Bob Lantz312eeda2015-11-02 21:39:42 -0800108 To add or modify a job, look for the "vm-build" project on https://gerrit.onosproject.org
Brian O'Connor01303d42014-09-19 18:10:58 -0700109 scm:
110 - git:
Bob Lantz312eeda2015-11-02 21:39:42 -0800111 url: https://gerrit.onosproject.org/vm-build
Brian O'Connor01303d42014-09-19 18:10:58 -0700112 branches:
113 - master
114 browser: gitweb
Bob Lantz312eeda2015-11-02 21:39:42 -0800115 browser-url: https://gerrit.onosproject.org/gitweb?p=vm-build.git
Brian O'Connor01303d42014-09-19 18:10:58 -0700116 timeout: 20
117 triggers:
Brian O'Connor4e72d842014-09-19 18:20:04 -0700118 - gerrit:
Brian O'Connor01303d42014-09-19 18:10:58 -0700119 trigger-on-ref-updated-event: true
120 trigger-on-change-merged-event: true
121 projects:
122 - project-compare-type: 'PLAIN'
123 project-pattern: 'vm-build'
124 branches:
125 - branch-compare-type: 'PLAIN'
126 branch-pattern: 'master'
Brian O'Connor4e72d842014-09-19 18:20:04 -0700127 silent: true
Brian O'Connor01303d42014-09-19 18:10:58 -0700128 builders:
Bob Lantz601c98e2014-10-07 16:34:49 -0700129 - shell: "jenkins-jobs --flush-cache --conf /var/lib/jenkins/jenkins_jobs.conf update jobs.yaml"
Brian O'Connorc990f872014-09-19 18:21:25 -0700130
131- job:
132 name: update-jenkins-verify
Brian O'Connor380c2522014-09-20 00:12:40 -0700133 description: |
134 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 -0700135 parameters:
136 - string:
137 name: GERRIT_REFSPEC
Bob Lantz933c4a22014-09-22 17:27:37 -0700138 default: refs/heads/master
Brian O'Connor73666062014-09-20 02:29:13 -0700139 description: "Use master as default when using Build Now."
Brian O'Connordb899fb2014-09-19 23:09:14 -0700140 scm:
141 - git:
Bob Lantz312eeda2015-11-02 21:39:42 -0800142 url: https://gerrit.onosproject.org/vm-build
Brian O'Connor73666062014-09-20 02:29:13 -0700143 refspec: $GERRIT_REFSPEC
Brian O'Connordb899fb2014-09-19 23:09:14 -0700144 branches:
145 - $GERRIT_BRANCH
146 browser: gitweb
Bob Lantz312eeda2015-11-02 21:39:42 -0800147 browser-url: https://gerrit.onosproject.org/gitweb?p=vm-build.git
Brian O'Connorc82eaf82014-09-20 03:28:50 -0700148 choosing-strategy: gerrit
Brian O'Connordb899fb2014-09-19 23:09:14 -0700149 timeout: 20
150 triggers:
151 - gerrit:
152 trigger-on-draft-published-event: true
153 trigger-on-patchset-uploaded-event: true
Brian O'Connor51c53d82014-09-19 23:19:42 -0700154 trigger-for-unreviewed-patches: true
Brian O'Connordb899fb2014-09-19 23:09:14 -0700155 projects:
156 - project-compare-type: 'PLAIN'
157 project-pattern: 'vm-build'
158 branches:
159 - branch-compare-type: 'PLAIN'
160 branch-pattern: 'master'
161 builders:
162 - shell: "jenkins-jobs test jobs.yaml"