bf88fe32c1
Prior to this patch macros serialized into a yaml document, a simple string substitution was applied and then they were re-loaded into python. This created several problems: - newlines are lost because the yaml loading was not respecting the newline settings of the original strings (Story: 1387060) - {obj:} notation was not working for macro parameters (Story: 2000254) - multiline strings passed into scripts will create a yaml syntax error when being re-loaded (unticketed) This patch resolves these problems by replacing the previous interpolation code with the more robust `deep_format` method. A side effect of this patch is that there are now fewer disparate code paths for interpolating variables. Change-Id: Ia06c98286537a50dc52c6e5e000b32ebc9e8ede2 Signed-off-by: Justin Stoller <justin.stoller@gmail.com>
27 lines
588 B
YAML
27 lines
588 B
YAML
- scm:
|
|
name: multi-branch-git
|
|
scm:
|
|
- git:
|
|
url: 'git://github.com/{git_user}/{git_project}.git'
|
|
skip-tag: true
|
|
branches: '{obj:git_branches}'
|
|
wipe-workspace: false
|
|
shallow-clone: true
|
|
fastpoll: true
|
|
clean:
|
|
before: true
|
|
after: true
|
|
submodule:
|
|
recursive: true
|
|
|
|
|
|
- job:
|
|
name: my-job
|
|
scm:
|
|
- multi-branch-git:
|
|
git_user: 'me'
|
|
git_project: 'my-project'
|
|
git_branches:
|
|
- main-branch
|
|
- other-branch
|