jenkins-job-builder/tests/yamlparser/fixtures/complete001.yaml
Jan Hruban 28cab53d5d Allow template-name in the global defaults
Inject the template-name into parameters earlier, so it's possible to
use it in the global defaults. Mark the template name as 'verbatim' so
the interpolation is skipped by the formatter.

Change-Id: I5d98e32ed2bedaa6b536e61fbdec589f358f861f
2018-01-16 16:00:46 +01:00

114 lines
3.1 KiB
YAML

- defaults:
name: global
description: |
JJB template: {template-name}
- wrapper:
name: timeout-wrapper
wrappers:
- timeout:
fail: true
elastic-percentage: 150
elastic-default-timeout: 90
type: elastic
- wrapper:
name: pre-scm-shell-ant
wrappers:
- pre-scm-buildstep:
buildsteps:
- shell: |
#!/bin/bash
echo "Doing somethiung cool"
- shell: |
#!/bin/zsh
echo "Doing somethin cool with zsh"
- ant:
targets: "target1 target2"
ant-name: "Standard Ant"
- inject:
properties-file: example.prop
properties-content: EXAMPLE=foo-bar
- wrapper:
name: copy-files
wrappers:
- copy-to-slave:
includes:
- file1
- file2*.txt
excludes:
- file2bad.txt
- trigger:
name: gerrit-review
triggers:
- gerrit:
trigger-on-patchset-uploaded-event: true
trigger-on-change-merged-event: false
trigger-on-ref-updated-event: false
trigger-on-comment-added-event: false
override-votes: true
gerrit-build-started-verified-value: 0
gerrit-build-successful-verified-value: 1
gerrit-build-failed-verified-value: -1
gerrit-build-unstable-verified-value: -1
gerrit-build-notbuilt-verified-value: -1
gerrit-build-started-codereview-value: 0
gerrit-build-successful-codereview-value: 1
gerrit-build-failed-codereview-value: -1
gerrit-build-unstable-codereview-value: -1
gerrit-build-notbuilt-codereview-value: -1
projects:
- project-compare-type: 'PLAIN'
project-pattern: '{project_pattern}'
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**'
start-message: 'Start message.'
failure-message: 'Failed message.'
successful-message: 'Success message.'
unstable-message: 'Unstable message.'
notbuilt-message: 'Not built message.'
- scm:
name: gerrit-scm
scm:
- git:
url: ssh://jenkins@review.openstack.org:29418/{project_pattern}.git
branches:
- origin/**
name: origin
prune: true
clean: true
browser: gitweb
browser-url: http://review.openstack.org/gitweb?p={project_pattern}.git
choosing-strategy: gerrit
- project:
name: complete001
version:
- 1.2
jobs:
- 'complete001'
- job-template:
name: 'complete001_{version}'
id: 'complete001'
scm:
- gerrit-scm:
project_pattern: openstack-infra/jenkins-job-builder
triggers:
- gerrit-review:
project_pattern: openstack-infra/jenkins-job-builder
wrappers:
- timeout-wrapper
- pre-scm-shell-ant
- copy-files
builders:
- shell: 'echo JJB template: {template-name}'
- shell: |
#!/usr/bin/env python
#
print("Doing something cool with python")