| - defaults: |
| name: global |
| project-type: freestyle |
| description: | |
| This is an auto-generated job. |
| |
| To add or modify a job, look for the "vm-build" project on https://gerrit.onosproject.org |
| logrotate: |
| daysToKeep: 10 |
| numToKeep: 10 |
| artifactDaysToKeep: 5 |
| artifactNumToKeep: 5 |
| wrappers: |
| - workspace-cleanup: |
| include: |
| - "*" |
| dirmatch: true |
| - ansicolor |
| |
| # ---- Mininet Build and Test Jobs ---- |
| - project: |
| name: mininet-build |
| jobs: |
| - 'mininet-latest' |
| - 'mininet-stable' |
| - 'mininet-2.2.2' |
| |
| - job-group: |
| name: mininet-latest |
| flavor: |
| - trusty32server |
| - trusty64server |
| - xenial32server |
| - xenial64server |
| branch: 'master' |
| tag: '' |
| jobs: |
| - 'mininet-{flavor}{tag}' |
| - 'mininet-{flavor}-test{tag}' |
| |
| - job-group: |
| name: mininet-stable |
| flavor: |
| - trusty32server |
| - trusty64server |
| branch: '2.2.1' |
| tag: '-stable' |
| jobs: |
| - 'mininet-{flavor}{tag}' |
| - 'mininet-{flavor}-test{tag}' |
| |
| - job-group: |
| name: mininet-2.2.2 |
| flavor: |
| - trusty32server |
| - trusty64server |
| - xenial32server |
| - xenial64server |
| branch: 'devel/2.2.2' |
| tag: '-2.2.2' |
| jobs: |
| - 'mininet-{flavor}{tag}' |
| - 'mininet-{flavor}-test{tag}' |
| |
| - job-template: |
| name: 'mininet-{flavor}{tag}' |
| block-downstream: true |
| triggers: |
| - timed: "@midnight" |
| builders: |
| - shell: stdbuf -oL -eL mispipe "sudo ~mininet/mininet/util/vm/build.py -v --branch {branch} --test sanity {flavor} --chown `whoami`" "tr '\r' ' '" |
| - shell: zip `basename -s .ovf */*.ovf`.zip */*.vmdk */*.ovf |
| - shasum */*.vmdk */*.ovf */*.zip > `basename -s .ovf */*.ovf`.sha |
| publishers: |
| - archive: |
| artifacts: '**' |
| - logparser: |
| parse-rules: "/home/mininet/vm-build/mininet-build.rules" |
| unstable-on-warning: false |
| fail-on-error: true |
| - trigger-parameterized-builds: |
| - project: 'mininet-{flavor}-test{tag}' |
| condition: SUCCESS |
| predefined-parameters: dir=$WORKSPACE |
| |
| - job-template: |
| name: 'mininet-{flavor}-test{tag}' |
| parameters: |
| - string: |
| name: dir |
| default: /var/lib/jenkins/jobs/mininet-{flavor}/workspace |
| description: "$dir defaults to last build when using Build Now." |
| builders: |
| - shell: "echo $dir" |
| - 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' ' '" |
| publishers: |
| - logparser: |
| parse-rules: "/home/mininet/vm-build/mininet-test.rules" |
| unstable-on-warning: false |
| fail-on-error: true |
| |
| # ---- the following are jobs that update jenkins when this file is updated ---- |
| - job: |
| name: update-jenkins-jobs |
| description: | |
| This job updates Jenkins jobs automatically when updates are made to the YAML file. |
| |
| To add or modify a job, look for the "vm-build" project on https://gerrit.onosproject.org |
| scm: |
| - git: |
| url: https://gerrit.onosproject.org/vm-build |
| branches: |
| - master |
| browser: gitweb |
| browser-url: https://gerrit.onosproject.org/gitweb?p=vm-build.git |
| timeout: 20 |
| triggers: |
| - gerrit: |
| trigger-on-ref-updated-event: true |
| trigger-on-change-merged-event: true |
| projects: |
| - project-compare-type: 'PLAIN' |
| project-pattern: 'vm-build' |
| branches: |
| - branch-compare-type: 'PLAIN' |
| branch-pattern: 'master' |
| silent: true |
| builders: |
| - shell: "jenkins-jobs --flush-cache --conf /var/lib/jenkins/jenkins_jobs.conf update jobs.yaml" |
| |
| - job: |
| name: update-jenkins-verify |
| description: | |
| This job is used to verify new Jenkins jobs using jenkins-job test before they are accepted in Gerrit. |
| parameters: |
| - string: |
| name: GERRIT_REFSPEC |
| default: refs/heads/master |
| description: "Use master as default when using Build Now." |
| scm: |
| - git: |
| url: https://gerrit.onosproject.org/vm-build |
| refspec: $GERRIT_REFSPEC |
| branches: |
| - $GERRIT_BRANCH |
| browser: gitweb |
| browser-url: https://gerrit.onosproject.org/gitweb?p=vm-build.git |
| choosing-strategy: gerrit |
| timeout: 20 |
| triggers: |
| - gerrit: |
| trigger-on-draft-published-event: true |
| trigger-on-patchset-uploaded-event: true |
| trigger-for-unreviewed-patches: true |
| projects: |
| - project-compare-type: 'PLAIN' |
| project-pattern: 'vm-build' |
| branches: |
| - branch-compare-type: 'PLAIN' |
| branch-pattern: 'master' |
| builders: |
| - shell: "jenkins-jobs test jobs.yaml" |