211cd36318
Done in order to enable specifying build pipelines at the project level. Pipelines are built using the 'pipeline' plugin or the 'trigger-builds' plugin. The downstream job to be executed is specified at the project level, and substituted into the template. Ignoring definitions where the downstream job is blank allows the pipeline to be easily terminated. Also adding a samples/ directory, which currently contains an example of pipeline creation, together with a new tools/run-compare-xml-samples.sh to run the before/after test on the samples. Change-Id: Icc324d1485e22db7824ad784890db48eb3e48f8f Reviewed-on: https://review.openstack.org/13706 Reviewed-by: James E. Blair <corvus@inaugust.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Approved: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
74 lines
2.3 KiB
YAML
74 lines
2.3 KiB
YAML
# Sample YAML representation of a flexible pipeline for use with the
|
|
# Jenkins Build Pipeline Plugin
|
|
# (https://wiki.jenkins-ci.org/display/JENKINS/Build+Pipeline+Plugin)
|
|
# The pipeline is defined at the project level, using job-specific variable
|
|
# substitution to specify the next job in the pipeline ('pipeline-next')
|
|
# for each job.
|
|
#
|
|
# This example defines the skeleton of two deployment pipelines: one for
|
|
# a 'base_os' subsystem to three chef servers, and the second to
|
|
# a 'database' subsystem to two chef servers.
|
|
#
|
|
# The pipeline uses an automatically-executed job in '{subsys}-prepare'
|
|
# (using the Parameterized Trigger Plugin -
|
|
# https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin),
|
|
# and manually-triggered jobs using the Pipeline publisher (e.g.
|
|
# '{subsys}-initialise').
|
|
#
|
|
# Note how each project defines a different pipeline, with a different
|
|
# length, but re-uses the same job templates.
|
|
|
|
- project:
|
|
name: deploy_base_os
|
|
subsys: base_os
|
|
jobs:
|
|
- '{subsys}-prepare':
|
|
pipeline-next: '{subsys}-initialise'
|
|
- '{subsys}-initialise':
|
|
pipeline-next: '{subsys}-upload-chef-server1'
|
|
- '{subsys}-upload-chef-server1':
|
|
pipeline-next: '{subsys}-upload-chef-server2'
|
|
- '{subsys}-upload-chef-server2':
|
|
pipeline-next: '{subsys}-upload-chef-server3'
|
|
- '{subsys}-upload-chef-server3':
|
|
pipeline-next: ''
|
|
|
|
- project:
|
|
name: deploy_database
|
|
subsys: db
|
|
jobs:
|
|
- '{subsys}-prepare':
|
|
pipeline-next: '{subsys}-initialise'
|
|
- '{subsys}-initialise':
|
|
pipeline-next: '{subsys}-upload-chef-server1'
|
|
- '{subsys}-upload-chef-server1':
|
|
pipeline-next: '{subsys}-upload-chef-server2'
|
|
- '{subsys}-upload-chef-server2':
|
|
pipeline-next: ''
|
|
|
|
- job-template:
|
|
name: '{subsys}-prepare'
|
|
builders:
|
|
- trigger-builds:
|
|
- project: '{pipeline-next}'
|
|
|
|
- job-template:
|
|
name: '{subsys}-initialise'
|
|
publishers:
|
|
- pipeline: '{pipeline-next}'
|
|
|
|
- job-template:
|
|
name: '{subsys}-upload-chef-server1'
|
|
publishers:
|
|
- pipeline: '{pipeline-next}'
|
|
|
|
- job-template:
|
|
name: '{subsys}-upload-chef-server2'
|
|
publishers:
|
|
- pipeline: '{pipeline-next}'
|
|
|
|
- job-template:
|
|
name: '{subsys}-upload-chef-server3'
|
|
publishers:
|
|
- pipeline: '{pipeline-next}'
|