From 3e3996d32ac7b5504efe32c46e096cdbf4941b20 Mon Sep 17 00:00:00 2001 From: Darragh Bailey Date: Sun, 15 Jun 2014 16:48:26 +0100 Subject: Use yaml local tags to support including files 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 --- etc/jenkins_jobs.ini-sample | 1 + 1 file changed, 1 insertion(+) (limited to 'etc') diff --git a/etc/jenkins_jobs.ini-sample b/etc/jenkins_jobs.ini-sample index 6ea02b54..62fe9a87 100644 --- a/etc/jenkins_jobs.ini-sample +++ b/etc/jenkins_jobs.ini-sample @@ -1,6 +1,7 @@ [job_builder] ignore_cache=True keep_descriptions=False +include_path=.:scripts:~/git/ [jenkins] user=jenkins -- cgit