blob: 2854680bc368a0657e49f5e4eb5d4c4bd546575d [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:
Bob Lantz933c4a22014-09-22 17:27:37 -070030 - trusty32server
31 - trusty64server
Bob Lantz54c7f032016-08-01 16:05:57 -070032 - xenial32server
33 - xenial64server
Brian O'Connor685f2802014-11-25 12:14:42 -080034 branch: 'master'
35 tag: ''
Brian O'Connor9cf37152014-09-20 01:49:22 -070036 jobs:
Brian O'Connorfca243e2014-11-25 12:20:06 -080037 - 'mininet-{flavor}{tag}'
38 - 'mininet-{flavor}-test{tag}'
Brian O'Connor685f2802014-11-25 12:14:42 -080039
40- job-group:
41 name: mininet-stable
42 flavor:
43 - trusty32server
44 - trusty64server
Bob Lantzbbc6de92017-03-21 13:54:56 -070045 branch: '2.2.2'
Brian O'Connor685f2802014-11-25 12:14:42 -080046 tag: '-stable'
47 jobs:
Brian O'Connor685f2802014-11-25 12:14:42 -080048 - 'mininet-{flavor}{tag}'
49 - 'mininet-{flavor}-test{tag}'
Brian O'Connor9cf37152014-09-20 01:49:22 -070050
51- job-template:
Brian O'Connor685f2802014-11-25 12:14:42 -080052 name: 'mininet-{flavor}{tag}'
Brian O'Connor9cf37152014-09-20 01:49:22 -070053 block-downstream: true
Brian O'Connord0ad16e2014-09-20 00:07:08 -070054 triggers:
55 - timed: "@midnight"
56 builders:
Bob Lantz6fc8e132016-01-13 23:23:19 -080057 - 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 -070058 - shell: zip `basename -s .ovf */*.ovf`.zip */*.vmdk */*.ovf
Bob Lantz3218f162017-01-18 16:33:48 -080059 - shell: shasum */*.vmdk */*.ovf *.zip > `basename -s .ovf */*.ovf`.sha
Brian O'Connord0ad16e2014-09-20 00:07:08 -070060 publishers:
Brian O'Connor73666062014-09-20 02:29:13 -070061 - archive:
Brian O'Connor74b9c232014-09-20 04:01:46 -070062 artifacts: '**'
Bob Lantz825f3ee2014-09-25 20:08:10 -070063 - logparser:
64 parse-rules: "/home/mininet/vm-build/mininet-build.rules"
65 unstable-on-warning: false
66 fail-on-error: true
Brian O'Connord0ad16e2014-09-20 00:07:08 -070067 - trigger-parameterized-builds:
Brian O'Connorb8e63802014-11-25 13:51:09 -080068 - project: 'mininet-{flavor}-test{tag}'
Brian O'Connor3af0f482014-09-19 20:00:29 -070069 condition: SUCCESS
Brian O'Connor326d0422014-09-19 19:54:29 -070070 predefined-parameters: dir=$WORKSPACE
Brian O'Connor08c5b112014-09-19 19:10:17 -070071
Brian O'Connor9cf37152014-09-20 01:49:22 -070072- job-template:
Brian O'Connor685f2802014-11-25 12:14:42 -080073 name: 'mininet-{flavor}-test{tag}'
Brian O'Connor73666062014-09-20 02:29:13 -070074 parameters:
75 - string:
Bob Lantz933c4a22014-09-22 17:27:37 -070076 name: dir
Brian O'Connor73666062014-09-20 02:29:13 -070077 default: /var/lib/jenkins/jobs/mininet-{flavor}/workspace
78 description: "$dir defaults to last build when using Build Now."
Brian O'Connord0ad16e2014-09-20 00:07:08 -070079 builders:
Bob Lantz3f2c36d2014-09-25 19:01:47 -070080 - shell: "echo $dir"
Bob Lantz6fc8e132016-01-13 23:23:19 -080081 - 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 -070082 publishers:
83 - logparser:
Bob Lantz17ba9c82014-09-25 17:36:11 -070084 parse-rules: "/home/mininet/vm-build/mininet-test.rules"
Bob Lantzbe321b62014-09-25 17:16:25 -070085 unstable-on-warning: false
86 fail-on-error: true
Brian O'Connor65f99852014-09-19 23:14:03 -070087
88# ---- the following are jobs that update jenkins when this file is updated ----
Brian O'Connor01303d42014-09-19 18:10:58 -070089- job:
Brian O'Connor82792082014-09-19 18:59:43 -070090 name: update-jenkins-jobs
Brian O'Connor380c2522014-09-20 00:12:40 -070091 description: |
Bob Lantz6f806722014-09-22 18:13:47 -070092 This job updates Jenkins jobs automatically when updates are made to the YAML file.
Brian O'Connor380c2522014-09-20 00:12:40 -070093
Bob Lantz312eeda2015-11-02 21:39:42 -080094 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 -070095 scm:
96 - git:
Bob Lantz312eeda2015-11-02 21:39:42 -080097 url: https://gerrit.onosproject.org/vm-build
Brian O'Connor01303d42014-09-19 18:10:58 -070098 branches:
99 - master
100 browser: gitweb
Bob Lantz312eeda2015-11-02 21:39:42 -0800101 browser-url: https://gerrit.onosproject.org/gitweb?p=vm-build.git
Brian O'Connor01303d42014-09-19 18:10:58 -0700102 timeout: 20
103 triggers:
Brian O'Connor4e72d842014-09-19 18:20:04 -0700104 - gerrit:
Brian O'Connor01303d42014-09-19 18:10:58 -0700105 trigger-on-ref-updated-event: true
106 trigger-on-change-merged-event: true
107 projects:
108 - project-compare-type: 'PLAIN'
109 project-pattern: 'vm-build'
110 branches:
111 - branch-compare-type: 'PLAIN'
112 branch-pattern: 'master'
Brian O'Connor4e72d842014-09-19 18:20:04 -0700113 silent: true
Brian O'Connor01303d42014-09-19 18:10:58 -0700114 builders:
Bob Lantz601c98e2014-10-07 16:34:49 -0700115 - shell: "jenkins-jobs --flush-cache --conf /var/lib/jenkins/jenkins_jobs.conf update jobs.yaml"
Brian O'Connorc990f872014-09-19 18:21:25 -0700116
117- job:
118 name: update-jenkins-verify
Brian O'Connor380c2522014-09-20 00:12:40 -0700119 description: |
120 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 -0700121 parameters:
122 - string:
123 name: GERRIT_REFSPEC
Bob Lantz933c4a22014-09-22 17:27:37 -0700124 default: refs/heads/master
Brian O'Connor73666062014-09-20 02:29:13 -0700125 description: "Use master as default when using Build Now."
Brian O'Connordb899fb2014-09-19 23:09:14 -0700126 scm:
127 - git:
Bob Lantz312eeda2015-11-02 21:39:42 -0800128 url: https://gerrit.onosproject.org/vm-build
Brian O'Connor73666062014-09-20 02:29:13 -0700129 refspec: $GERRIT_REFSPEC
Brian O'Connordb899fb2014-09-19 23:09:14 -0700130 branches:
131 - $GERRIT_BRANCH
132 browser: gitweb
Bob Lantz312eeda2015-11-02 21:39:42 -0800133 browser-url: https://gerrit.onosproject.org/gitweb?p=vm-build.git
Brian O'Connorc82eaf82014-09-20 03:28:50 -0700134 choosing-strategy: gerrit
Brian O'Connordb899fb2014-09-19 23:09:14 -0700135 timeout: 20
136 triggers:
137 - gerrit:
138 trigger-on-draft-published-event: true
139 trigger-on-patchset-uploaded-event: true
Brian O'Connor51c53d82014-09-19 23:19:42 -0700140 trigger-for-unreviewed-patches: true
Brian O'Connordb899fb2014-09-19 23:09:14 -0700141 projects:
142 - project-compare-type: 'PLAIN'
143 project-pattern: 'vm-build'
144 branches:
145 - branch-compare-type: 'PLAIN'
146 branch-pattern: 'master'
147 builders:
148 - shell: "jenkins-jobs test jobs.yaml"