Parameters inside triggers were not updated while the upper
parameters were changed, were staying as default. Updated
the implementation to make it take from the upper level.
Change-Id: I16fc3525fcdf0a8bf3aea3b8422f0f2ad26f9e24
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
Added also a test case for version specific changes
Change-Id: I5213dccffc441037c63ee7c042aee4a8a84d9732
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
Resolves flake8 BLK related issues.
"BLK100 Black would make changes."
"BLK999 Unexpected exception: ..."
Change-Id: Ic6d4265e3d02b2f2a15ab851eaed98288c62730c
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Updated test cases as well, The tag has been introduced after 2.35.2
therefore the parameter is also >=2.35.2
Change-Id: Ie0801108a16969b420b341e2deaa6ba62deb116c
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
Up until now <inheritanceStrategy> tag was only added to jobs-in-a-folder
and folder configs. In JJB the tag's class is always set to
"InheritParentStrategy" which according to the docs means the "item will
inherit its parent items permissions". Apparently <inheritanceStrategy>
tag needs to be present on top-level jobs also. For top-level jobs
setting the tag's class value to "InheritParentStrategy" means the job
"will inherit the global security security settings" and this is the
default behavior.
The code has simplified a bit - if it's a folder then we use a different
property name for authorization matrix property, other than that the
code is the same for all three "variants": folder, job-in-a-folder and
job-outside-a-folder (top-level job).
Also this change fixes the missing <inheritanceStrategy> tag for
job-in-a-folder, where the folder name was specified as part of the
"name" key instead of the standalone "folder" key. With this change we
no longer check if a job is in a folder or not, so it's implicitly
fixed. Added a test case to catch potential regressions in the future.
The copyright notice reflects this and the previous contribution in this
module.
Change-Id: I84b22c09c8a107aab2b4eca20feffc9b61675a92
In the current implementation, jjb creates an empty
combinationFilter tag whenever there is `executionStrategy`.
This empty tag should not appear.
Change-Id: I2bf25ae58d12904ce0a00e0a5cfefbf27d9451ad
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
Implemented the following tags that have been missing:
- displayBuildErrorsOnDownstreamBuilds
- blackListCommitAuthor
- GhprbCommentFile
- GhprbNoCommitStatus
Following tags are printed when the value of the key is empty:
- whiteListTargetBranches
- blackListTargetBranches
- buildDescTemplate
- triggeredStatus
- startedStatus
- statusUrl
- addTestResults
Also updated tests
Change-Id: I1e19841d88728af9ac6aa9e1c78f89fe962a583f
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
The joinTrigger plugin now accepts a resultThreshold field instead
of the evenIfDownstreamUnstable boolean. Add support for a "threshold"
yaml field to manage this value.
Change-Id: I60ba999b963709a76854a4d50387d2b1eefae05f
Signed-off-by: David Aguilar <davvid@gmail.com>
Only emit the joinTrigger evenIfDownstreamUnstable property when
it has been configured. This property is no longer presented
in newer version of the join plugin, and has been replaced with
a result threshold. Mark the boolean as deprecated.
Change-Id: If87517330ebbef17146b20f47689a29f8417b20e
Signed-off-by: David Aguilar <davvid@gmail.com>
Depends on https://review.opendev.org/#/c/731169/
Change-Id: I8d1ed67b11e1ff1fcf13325108c007d6baff07c4
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
Main feature to use multibranch with defaults project type is
build configuration mode with default groovy script
stored in global Jenkins store provided by config-file provider
plugin. Options "script-id" and "sandbox" fully implements this
feature.
Besides both project type support "script-path" and "script-id"
mode. It may be convenient to switch mode without changing project
type in order to save project history.
Change-Id: I4cd62e69c9abe7d8fc2e0dfdbe25d8b07ddf51c5
Added support of trigger-build-on-pr-comment, trigger-build-on-pr-rewiev,
trigger-build-on-pr-update options for multibranch project. Modified
multibranch test case to cover new options.
Change-Id: Ia8658b49e7f7806ef1a8f34de10eaee5b3b7b488
Signed-off-by: Rotaru Sergey <badwings@yandex.ru>
In my opinion the best choise for default value of discover_pr_origion
is not specified(None value) like it is done for bitbucket scm.
Currently there is no way to disable this option for github scm.
Added false value as one of valid value for this option, like is done
for discover-pr-fork-strategy. In fact any of yaml specification false
implementation should work.
Change-Id: Ibc26d6b5c39b5455160ba5c84be99575b79fc102
When running JJB under py3 (py3.6) it started to fail with exception
TypeError: cannot serialize '_io.BufferedReader' object
This is happens when doing deepcopy of a LazyLoader object which
contains an instance of BufferedReader object.
Under py2 this works but under py3 it is not.
This commit adds custom __deepcopy__ method to LazyLoader that
avoids deepcopy of a self._loader.
Change-Id: I00844fc06ebf84538d557c33f1179a26cb18202f
Story: 2007227
Introduce 2 booleans in the Gradle builder section to support passing
parameters by System Properties and Project Properties
Change-Id: I0de1e20b85902263e0d83ccadd64d42fc2b37193
The changes include:
- deprecated the following options and made support for them dependent
on the Gerrit Trigger plugin version:
- 'no-name-and-email'
- 'readable-message'
- 'trigger-for-unreviewed-patches'
- added a set of new options:
- 'name-and-email-parameter-mode' (replaced 'no-name-and-email')
- 'commit-message-parameter-mode' (replaced 'readable-message')
- 'change-subject-parameter-mode'
- 'comment-text-parameter-mode'
all these options can have one of the following values:
- NONE
- PLAIN
- BASE64
the default value for the first two options is taken from the
respective options they replaced, if they exist in the input YAML
file, so the overall change should be backward compatible
- fixed the value generated for <dynamicTriggerConfiguration> element
it should be "true"/"false" instead of "True"/"False"
- added an empty <dynamicGerritProjects> element when dynamic trigger
functionality is disabled to match what the plugin does
With the above changes the markup generated by JJB is fully aligned with
Gerrit Trigger plugin v2.30.x. Tested on Gerrit Trigger plugin v2.30.0.
Task: 39871
Story: 2007722
Change-Id: I25800874f51a93a351926a9a1be255cce80b88bd
The changes include:
- <concurrentBuild> should now be represented as
<org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty/>
property
- <triggers> should now be localed inside
<org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
property, in <properties> section
- unsupported XML elements got removed:
- <blockBuildWhenDownstreamBuilding>
- <blockBuildWhenUpstreamBuilding>
- <assignedNode>
- <canRoam>
- <customWorkspace>
- got rid of publishers from project_pipeline_template005.{xml,yaml} as
these are not supported in Pipeline jobs
The above changes align the produced XMLs with the ones from Jenkins 2.190.1
and Pipeline plugin v2.6.
Task: 39836
Story: 2007708
Change-Id: I650ef2ee60e872cce8f93de5f391933d68ec81f0
Implemented new parameter "disable-host-key-checking" to make the
"anbile-playbook" builder compatible with version >=1.0 of the ansible
plugin. The parameter defaults to "false" for security reasons (as the
plugin does).
The old parameter "host-key-checking" is still written to XML to keep
code working in a setup with plugin version <1.0. This has no impact
on newer setups because the plugin with version >=1.0 ignores the old
parameter value.
For same security reasons the default value of old parameter
"host-key-checking" was changed to "true" to "fix" older setups which
have the parameter not defined.
Change-Id: I4a592c1a4d6ba8bb4f365ce505296cf5c09f7e19
Task: 39789
Story: 2007678
Without the fix:
> 2020-05-11 10:56:12.238+0000 [id=29522] WARNING
> o.e.j.s.h.ContextHandler$Context#log: Error while serving http://localhost/job/someFolder/createItem
> java.lang.ClassCastException: com.cloudbees.hudson.plugins.folder.properties.AuthorizationMatrixProperty cannot be cast to hudson.model.JobProperty
It turns out com.cloudbees.hudson.plugins.folder.properties.AuthorizationMatrixProperty
should only be applied to Folders, not Jobs. The latter should use
hudson.security.AuthorizationMatrixProperty.
Task: 39760
Story: 2007666
Change-Id: I64907265b214fb1e489e1e657a30c90d6ee08c3f
Add support for the recipient item "Upstream Committers" of the
"Send To" list of a trigger of the "Email Extension" (email-ext)
plugin.
Change-Id: Iaa77330bb1910881df154494b0472ce21ea28d99
Task: 39595
Story: 2007607
stestr 3.0.0 does not support python 2.7 but has been released without
the proper metadata to reflect that. As a result, there is a python2 wheel
stestr-3.0.0-py2-none-any.whl which get picked up.
Blacklist stestr 3.0.0 to fix '--list': no such option error
Change-Id: I11898e1021973fa4c3031f1388d58d868feb601a
When this boolean parameter is set to true, updating a merge request
cancels any pending merge-request builds.
Change-Id: Ic5ef400cf4cd088680b92bd10b88b79520795729
Without this change, multibranch project creation with authorization
parameter would fail with
hudson.security.AuthorizationMatrixProperty cannot be cast
to com.cloudbees.hudson.plugins.folder.AbstractFolderProperty
Change-Id: Ie83355705f0526f2984eca0e5f1f80fba8b1ba5f
executeOn setting is available for PostBuildStep
since 2.0 version of the Post Build Script plugin.
For previous plugin's version executeOn should be
set on the PostBuildScript layer.
Change-Id: I6b7c9ccfbd0a2d610499074675835e6b5d96cb17
Task: 39028
Story: 2007411