Pytest makes each scenario into individual selectable test.
To be able to run each scenario separately is very useful for development.
Change-Id: I4b1c990a1fd839ce327cd7faa27159a9b9632fed
Jinja2 formatter wasn't applied in case of macro parameter
without arguments, due to `ModuleRegistry.dispatch`
couldn't find the parameter definition in the registry.
On other hand, project properties weren't applied for
uno-choice parameter macro with arguments, so it makes
impossible to use these parameters with macros.
Change-Id: Idaff9307dff30567a80b917f6e5ac0717100c349
If the parameter is used in a macro, special fields from the
job layer (`_project-name`, `_project-full-name`) were not initialized.
Change-Id: Ie70f592c8ee71c3b8e1cfc3c2ba578e814af0a29
If there is the only one macro step in the conditional-step builders
with more than one build steps in the macro, it translated into the
SingleConditionalBuilder Jenkins XML tag, instead of ConditionalBuilder.
It leads to an invalid Jenkins configuration in that case.
Change-Id: Ib9866d93e4ee9fa2823dfb1b5d15870ff56ab9f8
Please review the following patch containing the code changes in
the repo. This patch is a transition patch and is the auto-generated
output of the python-black tool.
Change-Id: I2d2de71da8a105fb62b561899ae78441ddab4032
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Updates the PostBuildScript plugin to support the 2.x version which
had a major overhaul of the XML output for the plugin.
Change-Id: I9ff3161bc50be236013e32f3ca9ad81b38004dc8
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Jenkins Git plugin does not use your configured credentials for cloning
submodules, but you can told it to use credentials from parent
repository, by checking "Use credentials from default remote of parent
repository", and this "parent-credentials" will set that option.
So without this option jenkins git plugin will not be able to clone
submodules, if they are not public available.
The default value is "false", like in jenkins git plugin.
See-also: https://issues.jenkins-ci.org/browse/JENKINS-20941
Change-Id: I1cfb3f45bb082f538eff1a9e64a03be27f759a5f
Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
Only manifest-url is required for the Repo plugin, all other parameters
are optional, or should at least not generate empty tags, because the
actual 'repo' tool will be called with empty parameters, leading to
a failed execution.
This was introduced with a34bd67ef7.
Before that change, empty strings did not generate XML entries.
Change-Id: Ia66845cb71b01c8e26285ed2eabb1ef32622e3e1
Story: 2000727
Refactor base test class inheritance to allow for BaseTest class to be
reused without needing to also import the TestCase class everywhere in
order to avoid having the common test function executed on base classes.
This makes it easier to build base testing classes and then simplifies
the subclassing of these for actual tests.
Change-Id: I89809e8082469f814f245db4a9ab7658aac8a405
- Update doc options to have default values
- Update mapping to use single quote syntax
Change-Id: I6d06f7120eaec81c785230dd524de0178be88c00
Signed-off-by: Kien Ha <kienha9922@gmail.com>
Many configuration options have been extensions for at least 2 years, so
update the generated XML to actually configure these options.
Change-Id: Ic22ca4a6b8d61c977979a5eb63a2e884dc4391bd
Current implementation of Multiple SCMs Plugin seems to be broken. Test
with following combination of Jenkins and Multiple SCMs Plugin
* Jenkins 2.2 (latest) + multiple-scms 0.6 (latest)
* Jenkins 1.651.1 (latest LTS) + multiple-scms 0.6 (latest)
* Jenkins 1.409.1 (oldest LTS) + multiple-scms 0.1 (oldest)
* Jenkins 1.396 (oldest) + multiple-scms 0.1 (oldest)
all emitted XML with following format (apart from `plugin=` here and
there):
```
<scm class="org.jenkinsci.plugins.multiplescms.MultiSCM">
<scms>
<hudson.scm.SubversionSCM>
:
</hudson.scm.SubversionSCM>
<hudson.scm.CVSSCM>
:
</hudson.scm.CVSSCM>
</scms>
</scm>
```
whereas current Jenkins Job Builder implementation emits XML with
following format:
```
<scm class="org.jenkinsci.plugins.multiplescms.MultiSCM">
<scms>
<scm class="hudson.scm.SubversionSCM">
:
</scm>
<scm class="hudson.scm.CVSSCM">
:
</scm>
</scms>
</scm>
```
This commit will fix this problem by modifying child `scm` node to a
correct format before adding to the parent `scm` node.
Change-Id: I0b9115c156a06a7fbdf529341dfc6100edf225aa
Signed-off-by: Ryo Tagami <rtagami@airstrip.jp>
For the Git Plugin you can specify a reference repository to speed
up cloning. This is already implemented on the top level and this
commit adds it to the submodule extension.
Change-Id: Ic1d19d7c31ec7ecb5578a0ebad5bd936756c7582
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>
Capture logs to attach them on exceptions to simplify the debugging of
errors in tests when they occur.
Change-Id: I5c1b5c306aba37789a8d41eabf65e0ac628af838
All of the other tests that contain xml and yaml files are in
a 'fixture' folder. Change the name in this instance to be more
consistent.
Change-Id: I5d899c83e868b8f8ff80eb121884285718bc2db2
Use the extensions style configuration for setting the SCM Git clean
configuration. With this format we deprecate the older (clean: bool)
configuration format and replace it with this format:
clean:
after: bool
before: bool
The older configuration is still supported so users who did not update
their YAML files can upgrade without updating all their YAML files first.
Change-Id: I1cfc0e2951c2b4de5e67bcb8abdf0b8c070e7fc6
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Use the newer extensions style configuration for the SCM Wipe workspace
option. This change simply changes the output style of this
configuration leaving the original YAML configuration values in tact so
it is backwards compatible with the old style configuration for
wipe-workspace setting.
While this patch still sets the old <wipeOutWorkspace> value long with
the new extensions value. Jenkins appears to be happy with both values
present and prefers the extensions format if it exists. This should
allow the older Jenkins that only supports the older config format to
continue to work.
Change-Id: Ib5b1809d19a35f83f524ee84b18f0c58b851c70b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
added support for another extension type, and fix how extensions are populated to xml
Change-Id: Ic9cf21a268d4ee3fb9b9efdee65c3d49e0cdb31e
Signed-off-by: Kyle Rockman <kyle.rockman@mac.com>