Brian O'Connor | 9cf3715 | 2014-09-20 01:49:22 -0700 | [diff] [blame] | 1 | - defaults: |
| 2 | name: global |
Brian O'Connor | d0ad16e | 2014-09-20 00:07:08 -0700 | [diff] [blame] | 3 | project-type: freestyle |
Brian O'Connor | 9cf3715 | 2014-09-20 01:49:22 -0700 | [diff] [blame] | 4 | description: | |
Brian O'Connor | c6aef8f | 2014-09-20 01:51:08 -0700 | [diff] [blame] | 5 | This is an auto-generated job. |
Brian O'Connor | c9449db | 2014-09-20 02:04:51 -0700 | [diff] [blame] | 6 | |
Bob Lantz | 312eeda | 2015-11-02 21:39:42 -0800 | [diff] [blame] | 7 | To add or modify a job, look for the "vm-build" project on https://gerrit.onosproject.org |
Brian O'Connor | aa7950f | 2014-09-20 00:58:52 -0700 | [diff] [blame] | 8 | logrotate: |
Brian O'Connor | 7366606 | 2014-09-20 02:29:13 -0700 | [diff] [blame] | 9 | daysToKeep: 10 |
| 10 | numToKeep: 10 |
| 11 | artifactDaysToKeep: 5 |
| 12 | artifactNumToKeep: 5 |
Brian O'Connor | c9449db | 2014-09-20 02:04:51 -0700 | [diff] [blame] | 13 | wrappers: |
| 14 | - workspace-cleanup: |
Bob Lantz | 933c4a2 | 2014-09-22 17:27:37 -0700 | [diff] [blame] | 15 | include: |
Brian O'Connor | 1b80383 | 2014-09-20 02:13:48 -0700 | [diff] [blame] | 16 | - "*" |
Brian O'Connor | c9449db | 2014-09-20 02:04:51 -0700 | [diff] [blame] | 17 | dirmatch: true |
Bob Lantz | eb36a4e | 2014-09-25 18:17:33 -0700 | [diff] [blame] | 18 | - ansicolor |
Brian O'Connor | aa7950f | 2014-09-20 00:58:52 -0700 | [diff] [blame] | 19 | |
Brian O'Connor | 9cf3715 | 2014-09-20 01:49:22 -0700 | [diff] [blame] | 20 | # ---- Mininet Build and Test Jobs ---- |
| 21 | - project: |
| 22 | name: mininet-build |
Brian O'Connor | 685f280 | 2014-11-25 12:14:42 -0800 | [diff] [blame] | 23 | jobs: |
| 24 | - 'mininet-latest' |
| 25 | - 'mininet-stable' |
Bob Lantz | 388a2b4 | 2016-08-09 15:55:47 -0700 | [diff] [blame] | 26 | - 'mininet-2.2.2' |
Brian O'Connor | 685f280 | 2014-11-25 12:14:42 -0800 | [diff] [blame] | 27 | |
| 28 | - job-group: |
| 29 | name: mininet-latest |
Bob Lantz | 933c4a2 | 2014-09-22 17:27:37 -0700 | [diff] [blame] | 30 | flavor: |
Bob Lantz | 933c4a2 | 2014-09-22 17:27:37 -0700 | [diff] [blame] | 31 | - trusty32server |
| 32 | - trusty64server |
Bob Lantz | 54c7f03 | 2016-08-01 16:05:57 -0700 | [diff] [blame] | 33 | - xenial32server |
| 34 | - xenial64server |
Brian O'Connor | 685f280 | 2014-11-25 12:14:42 -0800 | [diff] [blame] | 35 | branch: 'master' |
| 36 | tag: '' |
Brian O'Connor | 9cf3715 | 2014-09-20 01:49:22 -0700 | [diff] [blame] | 37 | jobs: |
Brian O'Connor | fca243e | 2014-11-25 12:20:06 -0800 | [diff] [blame] | 38 | - 'mininet-{flavor}{tag}' |
| 39 | - 'mininet-{flavor}-test{tag}' |
Brian O'Connor | 685f280 | 2014-11-25 12:14:42 -0800 | [diff] [blame] | 40 | |
| 41 | - job-group: |
| 42 | name: mininet-stable |
| 43 | flavor: |
| 44 | - trusty32server |
| 45 | - trusty64server |
Bob Lantz | cc5ef5e | 2015-04-16 19:03:06 -0700 | [diff] [blame] | 46 | branch: '2.2.1' |
Brian O'Connor | 685f280 | 2014-11-25 12:14:42 -0800 | [diff] [blame] | 47 | tag: '-stable' |
| 48 | jobs: |
Brian O'Connor | 685f280 | 2014-11-25 12:14:42 -0800 | [diff] [blame] | 49 | - 'mininet-{flavor}{tag}' |
| 50 | - 'mininet-{flavor}-test{tag}' |
Brian O'Connor | 9cf3715 | 2014-09-20 01:49:22 -0700 | [diff] [blame] | 51 | |
Bob Lantz | c9f5a36 | 2016-08-09 15:40:11 -0700 | [diff] [blame] | 52 | - job-group: |
| 53 | name: mininet-2.2.2 |
| 54 | flavor: |
| 55 | - trusty32server |
| 56 | - trusty64server |
| 57 | - xenial32server |
Bob Lantz | b219cb4 | 2016-08-10 15:12:17 -0700 | [diff] [blame] | 58 | - xenial64server |
Bob Lantz | c9f5a36 | 2016-08-09 15:40:11 -0700 | [diff] [blame] | 59 | branch: 'devel/2.2.2' |
| 60 | tag: '-2.2.2' |
| 61 | jobs: |
| 62 | - 'mininet-{flavor}{tag}' |
| 63 | - 'mininet-{flavor}-test{tag}' |
| 64 | |
Brian O'Connor | 9cf3715 | 2014-09-20 01:49:22 -0700 | [diff] [blame] | 65 | - job-template: |
Brian O'Connor | 685f280 | 2014-11-25 12:14:42 -0800 | [diff] [blame] | 66 | name: 'mininet-{flavor}{tag}' |
Brian O'Connor | 9cf3715 | 2014-09-20 01:49:22 -0700 | [diff] [blame] | 67 | block-downstream: true |
Brian O'Connor | d0ad16e | 2014-09-20 00:07:08 -0700 | [diff] [blame] | 68 | triggers: |
| 69 | - timed: "@midnight" |
| 70 | builders: |
Bob Lantz | 6fc8e13 | 2016-01-13 23:23:19 -0800 | [diff] [blame] | 71 | - shell: stdbuf -oL -eL mispipe "sudo ~mininet/mininet/util/vm/build.py -v --branch {branch} --test sanity {flavor} --chown `whoami`" "tr '\r' ' '" |
Bob Lantz | b23a14d | 2014-10-01 16:49:23 -0700 | [diff] [blame] | 72 | - shell: zip `basename -s .ovf */*.ovf`.zip */*.vmdk */*.ovf |
Bob Lantz | 3218f16 | 2017-01-18 16:33:48 -0800 | [diff] [blame^] | 73 | - shell: shasum */*.vmdk */*.ovf *.zip > `basename -s .ovf */*.ovf`.sha |
Brian O'Connor | d0ad16e | 2014-09-20 00:07:08 -0700 | [diff] [blame] | 74 | publishers: |
Brian O'Connor | 7366606 | 2014-09-20 02:29:13 -0700 | [diff] [blame] | 75 | - archive: |
Brian O'Connor | 74b9c23 | 2014-09-20 04:01:46 -0700 | [diff] [blame] | 76 | artifacts: '**' |
Bob Lantz | 825f3ee | 2014-09-25 20:08:10 -0700 | [diff] [blame] | 77 | - logparser: |
| 78 | parse-rules: "/home/mininet/vm-build/mininet-build.rules" |
| 79 | unstable-on-warning: false |
| 80 | fail-on-error: true |
Brian O'Connor | d0ad16e | 2014-09-20 00:07:08 -0700 | [diff] [blame] | 81 | - trigger-parameterized-builds: |
Brian O'Connor | b8e6380 | 2014-11-25 13:51:09 -0800 | [diff] [blame] | 82 | - project: 'mininet-{flavor}-test{tag}' |
Brian O'Connor | 3af0f48 | 2014-09-19 20:00:29 -0700 | [diff] [blame] | 83 | condition: SUCCESS |
Brian O'Connor | 326d042 | 2014-09-19 19:54:29 -0700 | [diff] [blame] | 84 | predefined-parameters: dir=$WORKSPACE |
Brian O'Connor | 08c5b11 | 2014-09-19 19:10:17 -0700 | [diff] [blame] | 85 | |
Brian O'Connor | 9cf3715 | 2014-09-20 01:49:22 -0700 | [diff] [blame] | 86 | - job-template: |
Brian O'Connor | 685f280 | 2014-11-25 12:14:42 -0800 | [diff] [blame] | 87 | name: 'mininet-{flavor}-test{tag}' |
Brian O'Connor | 7366606 | 2014-09-20 02:29:13 -0700 | [diff] [blame] | 88 | parameters: |
| 89 | - string: |
Bob Lantz | 933c4a2 | 2014-09-22 17:27:37 -0700 | [diff] [blame] | 90 | name: dir |
Brian O'Connor | 7366606 | 2014-09-20 02:29:13 -0700 | [diff] [blame] | 91 | default: /var/lib/jenkins/jobs/mininet-{flavor}/workspace |
| 92 | description: "$dir defaults to last build when using Build Now." |
Brian O'Connor | d0ad16e | 2014-09-20 00:07:08 -0700 | [diff] [blame] | 93 | builders: |
Bob Lantz | 3f2c36d | 2014-09-25 19:01:47 -0700 | [diff] [blame] | 94 | - shell: "echo $dir" |
Bob Lantz | 6fc8e13 | 2016-01-13 23:23:19 -0800 | [diff] [blame] | 95 | - 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 Lantz | be321b6 | 2014-09-25 17:16:25 -0700 | [diff] [blame] | 96 | publishers: |
| 97 | - logparser: |
Bob Lantz | 17ba9c8 | 2014-09-25 17:36:11 -0700 | [diff] [blame] | 98 | parse-rules: "/home/mininet/vm-build/mininet-test.rules" |
Bob Lantz | be321b6 | 2014-09-25 17:16:25 -0700 | [diff] [blame] | 99 | unstable-on-warning: false |
| 100 | fail-on-error: true |
Brian O'Connor | 65f9985 | 2014-09-19 23:14:03 -0700 | [diff] [blame] | 101 | |
| 102 | # ---- the following are jobs that update jenkins when this file is updated ---- |
Brian O'Connor | 01303d4 | 2014-09-19 18:10:58 -0700 | [diff] [blame] | 103 | - job: |
Brian O'Connor | 8279208 | 2014-09-19 18:59:43 -0700 | [diff] [blame] | 104 | name: update-jenkins-jobs |
Brian O'Connor | 380c252 | 2014-09-20 00:12:40 -0700 | [diff] [blame] | 105 | description: | |
Bob Lantz | 6f80672 | 2014-09-22 18:13:47 -0700 | [diff] [blame] | 106 | This job updates Jenkins jobs automatically when updates are made to the YAML file. |
Brian O'Connor | 380c252 | 2014-09-20 00:12:40 -0700 | [diff] [blame] | 107 | |
Bob Lantz | 312eeda | 2015-11-02 21:39:42 -0800 | [diff] [blame] | 108 | To add or modify a job, look for the "vm-build" project on https://gerrit.onosproject.org |
Brian O'Connor | 01303d4 | 2014-09-19 18:10:58 -0700 | [diff] [blame] | 109 | scm: |
| 110 | - git: |
Bob Lantz | 312eeda | 2015-11-02 21:39:42 -0800 | [diff] [blame] | 111 | url: https://gerrit.onosproject.org/vm-build |
Brian O'Connor | 01303d4 | 2014-09-19 18:10:58 -0700 | [diff] [blame] | 112 | branches: |
| 113 | - master |
| 114 | browser: gitweb |
Bob Lantz | 312eeda | 2015-11-02 21:39:42 -0800 | [diff] [blame] | 115 | browser-url: https://gerrit.onosproject.org/gitweb?p=vm-build.git |
Brian O'Connor | 01303d4 | 2014-09-19 18:10:58 -0700 | [diff] [blame] | 116 | timeout: 20 |
| 117 | triggers: |
Brian O'Connor | 4e72d84 | 2014-09-19 18:20:04 -0700 | [diff] [blame] | 118 | - gerrit: |
Brian O'Connor | 01303d4 | 2014-09-19 18:10:58 -0700 | [diff] [blame] | 119 | 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'Connor | 4e72d84 | 2014-09-19 18:20:04 -0700 | [diff] [blame] | 127 | silent: true |
Brian O'Connor | 01303d4 | 2014-09-19 18:10:58 -0700 | [diff] [blame] | 128 | builders: |
Bob Lantz | 601c98e | 2014-10-07 16:34:49 -0700 | [diff] [blame] | 129 | - shell: "jenkins-jobs --flush-cache --conf /var/lib/jenkins/jenkins_jobs.conf update jobs.yaml" |
Brian O'Connor | c990f87 | 2014-09-19 18:21:25 -0700 | [diff] [blame] | 130 | |
| 131 | - job: |
| 132 | name: update-jenkins-verify |
Brian O'Connor | 380c252 | 2014-09-20 00:12:40 -0700 | [diff] [blame] | 133 | description: | |
| 134 | This job is used to verify new Jenkins jobs using jenkins-job test before they are accepted in Gerrit. |
Brian O'Connor | 7366606 | 2014-09-20 02:29:13 -0700 | [diff] [blame] | 135 | parameters: |
| 136 | - string: |
| 137 | name: GERRIT_REFSPEC |
Bob Lantz | 933c4a2 | 2014-09-22 17:27:37 -0700 | [diff] [blame] | 138 | default: refs/heads/master |
Brian O'Connor | 7366606 | 2014-09-20 02:29:13 -0700 | [diff] [blame] | 139 | description: "Use master as default when using Build Now." |
Brian O'Connor | db899fb | 2014-09-19 23:09:14 -0700 | [diff] [blame] | 140 | scm: |
| 141 | - git: |
Bob Lantz | 312eeda | 2015-11-02 21:39:42 -0800 | [diff] [blame] | 142 | url: https://gerrit.onosproject.org/vm-build |
Brian O'Connor | 7366606 | 2014-09-20 02:29:13 -0700 | [diff] [blame] | 143 | refspec: $GERRIT_REFSPEC |
Brian O'Connor | db899fb | 2014-09-19 23:09:14 -0700 | [diff] [blame] | 144 | branches: |
| 145 | - $GERRIT_BRANCH |
| 146 | browser: gitweb |
Bob Lantz | 312eeda | 2015-11-02 21:39:42 -0800 | [diff] [blame] | 147 | browser-url: https://gerrit.onosproject.org/gitweb?p=vm-build.git |
Brian O'Connor | c82eaf8 | 2014-09-20 03:28:50 -0700 | [diff] [blame] | 148 | choosing-strategy: gerrit |
Brian O'Connor | db899fb | 2014-09-19 23:09:14 -0700 | [diff] [blame] | 149 | timeout: 20 |
| 150 | triggers: |
| 151 | - gerrit: |
| 152 | trigger-on-draft-published-event: true |
| 153 | trigger-on-patchset-uploaded-event: true |
Brian O'Connor | 51c53d8 | 2014-09-19 23:19:42 -0700 | [diff] [blame] | 154 | trigger-for-unreviewed-patches: true |
Brian O'Connor | db899fb | 2014-09-19 23:09:14 -0700 | [diff] [blame] | 155 | 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" |