blob: 75f0e2e0205c5c0921590146263a9419b1fb6347 [file] [log] [blame]
- 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.onlab.us
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
flavor:
- precise32server
- precise64server
- trusty32server
- trusty64server
- utopic32server
- utopic64server
jobs:
- 'mininet-{flavor}'
- 'mininet-{flavor}-test'
- job-template:
name: 'mininet-{flavor}'
block-downstream: true
triggers:
- timed: "@midnight"
builders:
- shell: stdbuf -oL -eL mispipe "~mininet/mininet/util/vm/build.py -v --test sanity {flavor}" "tr '\r' ' '"
- shell: zip `basename -s .ovf */*.ovf`.zip */*.ovf */*.vmdk
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'
condition: SUCCESS
predefined-parameters: dir=$WORKSPACE
- job-template:
name: 'mininet-{flavor}-test'
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 "~mininet/mininet/util/vm/build.py -v --test core --test examplesfull --image $dir/*/*.vmdk" "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.onlab.us
scm:
- git:
url: ssh://jenkins@gerrit.onlab.us:29418/vm-build
branches:
- master
browser: gitweb
browser-url: https://gerrit.onlab.us/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 --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: ssh://jenkins@gerrit.onlab.us:29418/vm-build
refspec: $GERRIT_REFSPEC
branches:
- $GERRIT_BRANCH
browser: gitweb
browser-url: https://gerrit.onlab.us/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"