blob: 4f4a7bbb528aa5e0885ef02721151b5d0075277b [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'
26
27- job-group:
28 name: mininet-latest
Bob Lantz933c4a22014-09-22 17:27:37 -070029 flavor:
30 - precise32server
31 - precise64server
32 - trusty32server
33 - trusty64server
Bob Lantz4939d182016-01-12 15:41:57 -080034 - wily32server
35 - wily64server
Brian O'Connor685f2802014-11-25 12:14:42 -080036 branch: 'master'
37 tag: ''
Brian O'Connor9cf37152014-09-20 01:49:22 -070038 jobs:
Brian O'Connorfca243e2014-11-25 12:20:06 -080039 - 'mininet-{flavor}{tag}'
40 - 'mininet-{flavor}-test{tag}'
Brian O'Connor685f2802014-11-25 12:14:42 -080041
42- job-group:
43 name: mininet-stable
44 flavor:
45 - trusty32server
46 - trusty64server
Bob Lantzcc5ef5e2015-04-16 19:03:06 -070047 branch: '2.2.1'
Brian O'Connor685f2802014-11-25 12:14:42 -080048 tag: '-stable'
49 jobs:
Brian O'Connor685f2802014-11-25 12:14:42 -080050 - 'mininet-{flavor}{tag}'
51 - 'mininet-{flavor}-test{tag}'
Brian O'Connor9cf37152014-09-20 01:49:22 -070052
53- job-template:
Brian O'Connor685f2802014-11-25 12:14:42 -080054 name: 'mininet-{flavor}{tag}'
Brian O'Connor9cf37152014-09-20 01:49:22 -070055 block-downstream: true
Brian O'Connord0ad16e2014-09-20 00:07:08 -070056 triggers:
57 - timed: "@midnight"
58 builders:
Bob Lantz6fc8e132016-01-13 23:23:19 -080059 - 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 -070060 - shell: zip `basename -s .ovf */*.ovf`.zip */*.vmdk */*.ovf
Bob Lantz056ce042016-01-12 17:25:34 -080061 - shell: sudo chown -R jenkins `dirname */build.log`
Brian O'Connord0ad16e2014-09-20 00:07:08 -070062 publishers:
Brian O'Connor73666062014-09-20 02:29:13 -070063 - archive:
Brian O'Connor74b9c232014-09-20 04:01:46 -070064 artifacts: '**'
Bob Lantz825f3ee2014-09-25 20:08:10 -070065 - logparser:
66 parse-rules: "/home/mininet/vm-build/mininet-build.rules"
67 unstable-on-warning: false
68 fail-on-error: true
Brian O'Connord0ad16e2014-09-20 00:07:08 -070069 - trigger-parameterized-builds:
Brian O'Connorb8e63802014-11-25 13:51:09 -080070 - project: 'mininet-{flavor}-test{tag}'
Brian O'Connor3af0f482014-09-19 20:00:29 -070071 condition: SUCCESS
Brian O'Connor326d0422014-09-19 19:54:29 -070072 predefined-parameters: dir=$WORKSPACE
Brian O'Connor08c5b112014-09-19 19:10:17 -070073
Brian O'Connor9cf37152014-09-20 01:49:22 -070074- job-template:
Brian O'Connor685f2802014-11-25 12:14:42 -080075 name: 'mininet-{flavor}-test{tag}'
Brian O'Connor73666062014-09-20 02:29:13 -070076 parameters:
77 - string:
Bob Lantz933c4a22014-09-22 17:27:37 -070078 name: dir
Brian O'Connor73666062014-09-20 02:29:13 -070079 default: /var/lib/jenkins/jobs/mininet-{flavor}/workspace
80 description: "$dir defaults to last build when using Build Now."
Brian O'Connord0ad16e2014-09-20 00:07:08 -070081 builders:
Bob Lantz3f2c36d2014-09-25 19:01:47 -070082 - shell: "echo $dir"
Bob Lantz6fc8e132016-01-13 23:23:19 -080083 - 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 -070084 publishers:
85 - logparser:
Bob Lantz17ba9c82014-09-25 17:36:11 -070086 parse-rules: "/home/mininet/vm-build/mininet-test.rules"
Bob Lantzbe321b62014-09-25 17:16:25 -070087 unstable-on-warning: false
88 fail-on-error: true
Brian O'Connor65f99852014-09-19 23:14:03 -070089
90# ---- the following are jobs that update jenkins when this file is updated ----
Brian O'Connor01303d42014-09-19 18:10:58 -070091- job:
Brian O'Connor82792082014-09-19 18:59:43 -070092 name: update-jenkins-jobs
Brian O'Connor380c2522014-09-20 00:12:40 -070093 description: |
Bob Lantz6f806722014-09-22 18:13:47 -070094 This job updates Jenkins jobs automatically when updates are made to the YAML file.
Brian O'Connor380c2522014-09-20 00:12:40 -070095
Bob Lantz312eeda2015-11-02 21:39:42 -080096 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 -070097 scm:
98 - git:
Bob Lantz312eeda2015-11-02 21:39:42 -080099 url: https://gerrit.onosproject.org/vm-build
Brian O'Connor01303d42014-09-19 18:10:58 -0700100 branches:
101 - master
102 browser: gitweb
Bob Lantz312eeda2015-11-02 21:39:42 -0800103 browser-url: https://gerrit.onosproject.org/gitweb?p=vm-build.git
Brian O'Connor01303d42014-09-19 18:10:58 -0700104 timeout: 20
105 triggers:
Brian O'Connor4e72d842014-09-19 18:20:04 -0700106 - gerrit:
Brian O'Connor01303d42014-09-19 18:10:58 -0700107 trigger-on-ref-updated-event: true
108 trigger-on-change-merged-event: true
109 projects:
110 - project-compare-type: 'PLAIN'
111 project-pattern: 'vm-build'
112 branches:
113 - branch-compare-type: 'PLAIN'
114 branch-pattern: 'master'
Brian O'Connor4e72d842014-09-19 18:20:04 -0700115 silent: true
Brian O'Connor01303d42014-09-19 18:10:58 -0700116 builders:
Bob Lantz601c98e2014-10-07 16:34:49 -0700117 - shell: "jenkins-jobs --flush-cache --conf /var/lib/jenkins/jenkins_jobs.conf update jobs.yaml"
Brian O'Connorc990f872014-09-19 18:21:25 -0700118
119- job:
120 name: update-jenkins-verify
Brian O'Connor380c2522014-09-20 00:12:40 -0700121 description: |
122 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 -0700123 parameters:
124 - string:
125 name: GERRIT_REFSPEC
Bob Lantz933c4a22014-09-22 17:27:37 -0700126 default: refs/heads/master
Brian O'Connor73666062014-09-20 02:29:13 -0700127 description: "Use master as default when using Build Now."
Brian O'Connordb899fb2014-09-19 23:09:14 -0700128 scm:
129 - git:
Bob Lantz312eeda2015-11-02 21:39:42 -0800130 url: https://gerrit.onosproject.org/vm-build
Brian O'Connor73666062014-09-20 02:29:13 -0700131 refspec: $GERRIT_REFSPEC
Brian O'Connordb899fb2014-09-19 23:09:14 -0700132 branches:
133 - $GERRIT_BRANCH
134 browser: gitweb
Bob Lantz312eeda2015-11-02 21:39:42 -0800135 browser-url: https://gerrit.onosproject.org/gitweb?p=vm-build.git
Brian O'Connorc82eaf82014-09-20 03:28:50 -0700136 choosing-strategy: gerrit
Brian O'Connordb899fb2014-09-19 23:09:14 -0700137 timeout: 20
138 triggers:
139 - gerrit:
140 trigger-on-draft-published-event: true
141 trigger-on-patchset-uploaded-event: true
Brian O'Connor51c53d82014-09-19 23:19:42 -0700142 trigger-for-unreviewed-patches: true
Brian O'Connordb899fb2014-09-19 23:09:14 -0700143 projects:
144 - project-compare-type: 'PLAIN'
145 project-pattern: 'vm-build'
146 branches:
147 - branch-compare-type: 'PLAIN'
148 branch-pattern: 'master'
149 builders:
150 - shell: "jenkins-jobs test jobs.yaml"