jenkins-job-builder/tests/yamlparser/fixtures/project_pipeline_template005.yaml
Yann Voté 2fc361949c Add Pipeline job type and deprecate Workflow
Since introduction of the Jenkins Pipeline plugin
(https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin), one can
configure a Pipeline job using a Groovy file lying with the source code
(see: https://jenkins.io/solutions/pipeline/).

We add support here for this kind of jobs, introducing a new component:
pipeline-scm. This component contains information about the repository to
clone and the name of the file where the job configuration can be found.

Since Workflow plugin is just an old name for the Pipeline plugin,
Workflow job type can be deprecated in favor of Pipeline job type to
avoid confusion and keep JJB in line with the terms used in Jenkins.

Change-Id: I098b9673c44b1281fa0954193d8fadf273685386
Story: 2000573
Task: 2974
2017-01-24 18:39:16 +03:00

42 lines
766 B
YAML

- scm:
name: project-scm
scm:
- hg:
url: http://hg.example.org/project
clean: true
- job-template:
name: '{name}-unit-tests'
project-type: pipeline
pipeline-scm:
scm:
- project-scm
sandbox: true
publishers:
- email:
recipients: '{mail-to}'
- job-template:
name: '{name}-perf-tests'
project-type: pipeline
pipeline-scm:
scm:
- project-scm
sandbox: false
publishers:
- email:
recipients: '{mail-to}'
- job-group:
name: '{name}-tests'
jobs:
- '{name}-unit-tests':
mail-to: dev@example.org
- '{name}-perf-tests':
mail-to: qa@example.org
- project:
name: project-name
jobs:
- '{name}-tests'