From 4e653b2f0645be61a82e78c9dcdb52feb98c57fd Mon Sep 17 00:00:00 2001 From: Simon Heimberg Date: Fri, 18 Aug 2017 19:31:09 +0200 Subject: [PATCH] add some useful yaml hints --- docs/en/configuring_project.md | 50 +++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/docs/en/configuring_project.md b/docs/en/configuring_project.md index 0f78340c..6db62b48 100644 --- a/docs/en/configuring_project.md +++ b/docs/en/configuring_project.md @@ -120,7 +120,8 @@ branch-regex:^feature\-\d$: branch-release: # Test config for release branch run-option: replace # This can be set to either before, after or replace test: - php_cs_fixer: + +php_cs_fixer: allowed_warnings: 0 branch-master: # Test config for release branch run-option: after # This can be set to either before, after or replace @@ -140,3 +141,50 @@ Also add a new config value `run-option`, that can have 3 values: * `before` - will cause the branch specific plugins to run before the default ones. * `after` - will cause the branch specific plugins to run after the default ones. * `replace` - will cause the branch specific plugins to run and the default ones not. + +Useful YAML features +-------------------- + +Some features of YAML could be very handy. Here is a demonstration of multi line strings, and of anchors and aliases. +See more details on [symfonys yaml document](https://symfony.com/doc/current/components/yaml/yaml_format.html) on in the [specification](http://yaml.org/spec/1.0/#id2563922). + +```yml +setup: + # yaml comment + shell: + - | + echo a long shell command, multiple lines + scriptPath=%PROJECT_BUILD_PATH%/../../hook-path/prepare-test5.sh + if [ -f $scriptPath ] + then + "$scriptPath" '%PROJECT%' '%PROJECT_TITLE%' # script can read its path from $scriptPath + mkdir ../outputs_to_keep/%COMMIT% + fi + - > + echo this is a very long message I must write here, and it is much too long to allow good editing + on only one line, therefore we break it up onto multiple lines, but the result will be on a single + line. + - echo a short command ... + +branch-master: + complete: &xmpp + xmpp: + username: &userName "login@gmail.com" + password: &password "AZERTY123" + recipients: + - "builds-infos@jabber.org" + server: &xmppServer "gtalk.google.com" + alias: "build infos for project" + date_format: "%d/%m/%Y" + broken: + xmpp: + username: *userName + password: *password + recipients: + - "build-alters-infos@jabber.org" + server: *xmppServer +branch-bugfix1.9: + complete: *xmpp +branch-bugfix2.0: + complete: *xmpp +```