3e3996d32a
Add support for local tags which are application specific to allow including of other yaml files or code from scripts. Allows for code to be maintained and tested as seperate files, as well as reduces duplication of yaml code that cannot be macro'ed or easily templated by including it from a common file. Adds support for the following tags: 'include' - load file as yaml code 'include-raw' - load file as data (for scripts) 'include-raw-escaped' - load file as data with escaping braces '{}' as default for use with job-templates Use configuration file options to provide a search path for the files. - Test behaviour of yaml tags independent of any XML generation by comparing json result of yaml parsing to verify that certain tags do/don't recall the yaml.load() method. - Add examples for the include tags via addition tests for YamlParser class Inspired by http://stackoverflow.com/questions/528281/how-can-i-include-an-yaml-file-inside-another Change-Id: Ib90a07043112d4739d6529ceddbc9817668bcec0
38 lines
1.1 KiB
XML
38 lines
1.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<project>
|
|
<actions/>
|
|
<description><!-- Managed by Jenkins Job Builder --></description>
|
|
<keepDependencies>false</keepDependencies>
|
|
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
|
|
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
|
|
<concurrentBuild>false</concurrentBuild>
|
|
<canRoam>true</canRoam>
|
|
<properties>
|
|
<EnvInjectJobProperty>
|
|
<info>
|
|
<loadFilesFromMaster>false</loadFilesFromMaster>
|
|
</info>
|
|
<on>true</on>
|
|
<keepJenkinsSystemVariables>true</keepJenkinsSystemVariables>
|
|
<keepBuildVariables>true</keepBuildVariables>
|
|
</EnvInjectJobProperty>
|
|
</properties>
|
|
<scm class="hudson.scm.NullSCM"/>
|
|
<builders>
|
|
<hudson.tasks.Shell>
|
|
<command>#!/bin/bash
|
|
#
|
|
# Sample script showing how the yaml include-raw tag can be used
|
|
# to inline scripts that are maintained outside of the jenkins
|
|
# job yaml configuration.
|
|
|
|
echo "hello world"
|
|
|
|
exit 0
|
|
</command>
|
|
</hudson.tasks.Shell>
|
|
</builders>
|
|
<publishers/>
|
|
<buildWrappers/>
|
|
</project>
|