Commit Graph

1666 Commits

Author SHA1 Message Date
Unpublished
fedd4b52ab Add Gogs Plugin
Change-Id: I0230a605fd2c3d0c8f7df2c497f3b837499f8758
2021-01-16 12:21:15 +01:00
Zuul
2563ae4ef0 Merge "Added support of json type for extended choice parameter and related parameters. Added support of multilevel type for extended choice parameter dded jenkins_jobs.modules.helpers.check_mutual_exclusive_data_args decorator that used for validating data arguments in jenkins_jobs.modules.parameters.extended_choice_param method." 2021-01-12 14:47:17 +00:00
Zuul
f80afac754 Merge "Added support of SCM Filter branch PR behavior filters for multibranch projects" 2021-01-12 14:47:09 +00:00
Igor Lakhtenkov
bdedf1460c Added support of SCM Filter branch PR behavior filters for multibranch projects
Change-Id: I29d1050f021d509ca021136cc90a113756cd11cf
Task: #41308
2021-01-04 12:50:11 +03:00
Igor Lakhtenkov
2e988b3f26 Added support of json type for extended choice parameter and related parameters.
Added support of multilevel type for extended choice parameter
dded jenkins_jobs.modules.helpers.check_mutual_exclusive_data_args decorator that used for validating data arguments
in jenkins_jobs.modules.parameters.extended_choice_param method.

Change-Id: Id8c0f8090dd99022501558cafa5b1c27e6675425
Task: #41320
2021-01-04 12:36:24 +03:00
Anna Tikhonova
c12e41844c Add refspecs trait for github SCM
Change-Id: Ibdcd5621fa1d030cda26f29cadb3ae4c3c3f3704
Signed-off-by: Anna Tikhonova <anna.m.tikhonova@gmail.com>
2021-01-02 15:25:30 +00:00
Adam Romanek
118ac858c4 tests: fix mixed imports of 'unittest.mock' and 'mock'
The 'mock' package is imported in 'tests.base'. Whenever possible
'tests.base' prefers 'unittest.mock' over 'mock' (which is the case on
Python 3.3+). Importing 'mock' together with 'unittest.mock' causes
unexpected behavior that results in exceptions when running tests, at
least on Python 3.6.12, like:

>  File "/usr/lib/python3.6/unittest/mock.py", line 1196, in patched
>    patching.__exit__(*exc_info)
>
>  File "/home/zuul/src/opendev.org/jjb/jenkins-job-builder/.tox/cover/lib/python3.6/site-packages/mock/mock.py", line 1545, in __exit__
>    return exit_stack.__exit__(*exc_info)
>
>  File "/usr/lib/python3.6/contextlib.py", line 339, in __exit__
>    received_exc = exc_details[0] is not None
>
>  IndexError: tuple index out of range

From now on, to avoid similar issues in the future, the 'mock' package
is only installed for Python 2.x.

Change-Id: Ib3044312f0770735d88d8657d1f953e5a33e771f
2021-01-01 12:58:28 +01:00
Zuul
7c1c936478 Merge "Updated BuildTimeoutWrapper plugin" 2020-11-16 14:06:38 +00:00
Zuul
24b3b9c87b Merge "Update Build Name support" 2020-11-16 14:06:38 +00:00
Zuul
8b2092770b Merge "Active Choices parameters support" 2020-11-16 14:01:32 +00:00
Zuul
8f48b73ea8 Merge "Add support for retries options in notifications" 2020-11-13 16:32:59 +00:00
Artem Nikitin
3abe808991 Fix system_groovy issue
System groovy has difference with the simple groovy command. System
groovy result XML for system groovy command (script), looks like this:

    <hudson.plugins.groovy.SystemGroovy plugin="groovy@2.3">
      <source class="hudson.plugins.groovy.StringSystemScriptSource">
        <script plugin="script-security@1.75">
          <script>Groovy command</script>
          <sandbox>[true|false]</sandbox>
          <classpath>
            <entry>
              <url>...</url>
            </entry>
            ...
            <entry>
              <url>...</url>
            </entry>
          </classpath>
        </script>
      </source>
      <bindings>...</bindings>
    </hudson.plugins.groovy.SystemGroovy>

Change-Id: I85eb5848de2a817ab132559b53cbeb316931195f
2020-11-13 15:21:47 +00:00
erelk987
348c93cc7e Add support for retries options in notifications
Nr of retries options added to Notifications plugin
in commit ee22c8b released in notification-1.12 July 2017.

Change-Id: I3271dfd68cd8d28024af952cda7500d438a2676e
2020-11-13 15:20:22 +00:00
David Aguilar
ac9861d2fb publishers/join-trigger: advertise "threshold" in the docs
The join-trigger documentation still uses the deprecated
"even-if-unstable" field in its examples.

Update the "join-trigger001.yaml" fixture referenced by the
documentation to use the "threshold" configuration instead.

Add a new fixture to retain coverage for "even-if-unstable".

Change-Id: Ic8b28b384e0a6d7e43833d2db9524a41e4508ba7
2020-11-07 13:35:47 -08:00
Zuul
63dbc6752e Merge "Support "All Strategies Match" and "Any Strategies Match"" 2020-11-03 15:52:45 +00:00
AnnA Tikhonova
6ddb8f7d35 Support "All Strategies Match" and "Any Strategies Match"
Support recursive build strategies from Basic Branch Build
Strategies Plugin

Change-Id: Idc1d2bc679ba489f5ef487648cca1e9044084990
Signed-off-by: Anna Tikhonova <anna.m.tikhonova@gmail.com>
2020-11-02 23:30:49 +03:00
Anna Tikhonova
d80d6bf723 Support raw XML injection in multibranch build strategies
build-strategies:
     - raw:
         xml: |
           <c.i.j.p.m.b.IncludeRegionBranchBuildStrategy plugin="...">
             <includedRegions>my/cool/project/*.cpp</includedRegions>
           </c.i.j.p.m.b.IncludeRegionBranchBuildStrategy>

Change-Id: I3679c81a4a4b28204460b1563bb7585a3e67a449
Signed-off-by: Anna Tikhonova <anna.m.tikhonova@gmail.com>
2020-11-02 23:28:55 +03:00
Zuul
c420d57af9 Merge "Slack: support custom messages per build result" 2020-10-16 02:49:07 +00:00
Alexandre Erwin Ittner
8ed66b00a2 Slack: support custom messages per build result
Add support for custom messages per build result in the Slack
notification plugin.

Change-Id: Iafc8b67528914c6d14c78f72aa535a3cfa7f7033
Story: 2007912
Task: 40315
2020-10-15 20:15:04 -03:00
Sagar Khushalani
7b805f9c0c Add missing vault-secrets options
This patch adds the following options that are missing from JJB
but available in the UI:

- fail if path not found
- skip ssl verification
- k/v engine version

Change-Id: Id8e14d63c668a1ef826ae88ae3ce0360609bde99
2020-10-13 07:51:16 -05:00
Eren ATAS
6cad52986e Active Choices parameters support
Following parameters have been implemented in JJB:
- Active Choices Parameter
- Active Choices Reactive Reference Parameter

Test cases also have been written.

Change-Id: I6e953aa26114fde9ff293ed17cc17d5972df9af3
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
2020-10-12 14:00:54 +02:00
Eren ATAS
5768260ecc Update Build Name support
Added the missing tags, also added a test case.

Change-Id: Ic1cb6c3991afe7ef99dd448e6ba49d510f54bd59
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
2020-10-02 13:35:45 +02:00
Eren ATAS
6b3d7d806b Updated BuildTimeoutWrapper plugin
On version 1.17 of BuildTimeoutWrapper plugin, new option
called "AbortAndRestart" has been introduced. The plugin support
has been updated in order to support this option. A test case
also added.

Change-Id: I4bcbdbc45e177fc4d302baa68898e89463535f6f
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
2020-10-02 13:34:16 +02:00
Zuul
cf8b2721ed Merge "Introduce a new '!j2-yaml:' tag" 2020-09-25 15:25:31 +00:00
Zuul
9aa9808f22 Merge "[ONEM-16360] Parameter Separator support" 2020-09-25 15:23:51 +00:00
Eren ATAS
e4f2724a00 [ONEM-16360] Parameter Separator support
Tests are also added.

Change-Id: I509fd9689be7693f95f87a5f23c2fe5adf2f82d5
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
2020-09-25 14:55:43 +00:00
Eren ATAS
fed356f4ac Support for Naginator-Opt-Out property
Test case is added.

Change-Id: I3d26391b9f8f4cd5e3ca8df38271c4a01f7b8ce2
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
2020-09-25 14:55:36 +00:00
Zuul
35457bfd1c Merge "feat: support the skip-notifications-trait plugin for git repos" 2020-09-25 07:45:27 +00:00
Zuul
85ebc58b43 Merge "feat: add support for specifying the git user's identity" 2020-09-25 07:45:26 +00:00
Eren ATAS
2a5acc24d6 Updated Email Extended Publisher Plugin
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>
2020-09-18 11:59:43 +02:00
Giel van Schijndel
c1e3807ac7 feat: support the skip-notifications-trait plugin for git repos
Change-Id: If466d36671a8d87e0543d625f5b4e5302111874d
2020-09-16 18:53:18 +02:00
Giel van Schijndel
eec4770574 feat: add support for specifying the git user's identity
This gives control over who's identity gets used for newly created
commits.

Change-Id: I8ceaabdaafa2be9c4abcfea8a2afb847d01ed0e6
2020-09-16 18:48:22 +02:00
Zuul
3a05654787 Merge "Updated ext-email support" 2020-09-16 16:22:23 +00:00
Adam Romanek
6bc5398336 Introduce a new '!j2-yaml:' tag
The tag provides Jinja templating capabilities for generating parts of
YAML structures. Two potential use cases are provided as test cases and
are linked in the documentation.

The new tag should also help address some use cases people were asking
about, like here:
https://groups.google.com/g/jenkins-job-builder/c/HkVZVuBDlKM.

Change-Id: I96392e42c3c79a9be0a8f736506908701251dd62
2020-09-14 14:37:31 +02:00
Zuul
afc2b6fd42 Merge "multibranch: Add refspecs trait to bitbucket scm" 2020-09-08 13:57:43 +00:00
Eren ATAS
a24a547de0 Updated ext-email support
Added also a test case for version specific changes

Change-Id: I5213dccffc441037c63ee7c042aee4a8a84d9732
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
2020-09-02 15:37:16 +02:00
Matt Kucia
6367f04fcf multibranch: Add lfs pull trait to bitbucket scm
Change-Id: Ibf89cdfbfb6fc791f92a21d07442475325f46a3c
2020-09-02 12:32:25 +00:00
Matt Kucia
74d2e1302c multibranch: Add refspecs trait to bitbucket scm
Change-Id: Id0d65a89d044cbf0c7455f5c79bfaae226f74ada
2020-09-02 12:32:16 +00:00
Thanh Ha
5a98ebb8bb
Fix flake8 BLK100 and BLK999 issues
Resolves flake8 BLK related issues.

"BLK100 Black would make changes."
"BLK999 Unexpected exception: ..."

Change-Id: Ic6d4265e3d02b2f2a15ab851eaed98288c62730c
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
2020-08-31 10:54:19 -04:00
Eren ATAS
15ee9899b8 Added property-multiline for parameterized build trigger plugin
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>
2020-07-31 14:12:00 +02:00
Zuul
c5fac510f2 Merge "Fix Authorization Matrix property - inheritance strategy" 2020-07-17 13:55:00 +00:00
Zuul
fd85f34754 Merge "Updated GHPRB plugin support" 2020-07-15 14:13:53 +00:00
Zuul
c69fb5f68f Merge "Removed the unnecessary empty combinationFilter Tag" 2020-07-15 14:13:52 +00:00
Zuul
4968b81b61 Merge "publishers: add "threshold" support to join-trigger" 2020-07-15 14:13:49 +00:00
Zuul
784a38ecc9 Merge "Implement disable discover_pr_origin" 2020-07-15 14:04:43 +00:00
Zuul
156861a149 Merge "Implement GitHub PR Comment Build Plugin" 2020-07-15 14:04:10 +00:00
Zuul
a21a64ec72 Merge "Implement script-id for multibranch with default." 2020-07-15 14:02:48 +00:00
Adam Romanek
703a76650f Fix Authorization Matrix property - inheritance strategy
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
2020-07-15 13:11:33 +02:00
Eren ATAS
2e84bdf5b6 Removed the unnecessary empty combinationFilter Tag
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>
2020-07-07 11:32:51 +02:00
Eren ATAS
987dbc4d2b Updated GHPRB plugin support
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>
2020-07-07 11:20:46 +02:00