In version 2.1045.v4ec3ed07b_e4f Branch API Plugin added options to
configure suppressing SCM trigger. Previously this feature could
be only turned on or off, now it's possible to select what to suppress
and on which branches.
(see https://github.com/jenkinsci/branch-api-plugin/pull/244)
This commit adds support for this option by allowing dictionary syntax
for `suppress-scm-triggering` element:
```
- suppress-scm-triggering:
suppression-strategy: suppress-branch-indexing
branch-regex: ^.*test.*$
```
while preserving support for currently existing syntax:
```
- suppress-scm-triggering: true
```
Change-Id: I5d0b32042fc07d674bf2f26e5b468f051077fb02
In version 78.v2dcf62ba199b GitHub Pull Request Comment Build Plugin
introduced permissions check for users triggering jobs with comments.
This added a new checkbox/XML element that allows untrusted users to
trigger builds.
(see https://github.com/jenkinsci/github-pr-comment-build-plugin/pull/46)
This commit adds support for this option by allowing dictionary syntax for GH PR Comment Build plugin:
```
- trigger-build-on-pr-review:
allow-untrusted-users: true
```
while preserving support for currently existing syntax:
```
- trigger-build-on-pr-review: true
```
Change-Id: I554129c779161b47cba4566f7821ef7590a242e0
Pytest makes each scenario into individual selectable test.
To be able to run each scenario separately is very useful for development.
Change-Id: I4b1c990a1fd839ce327cd7faa27159a9b9632fed
This makes it possible to filter branches with regular expressions
also when using the gerrit_scm.
Change-Id: Ie43674cccf942420d42e1ee4fd194db30b09d19f
Support was previously added for the other multibranch pipeline scms,
but not for gerrit. This change makes adds support for available git
extensions to the gerrit multibranch pipeline scm.
Previous review: https://review.opendev.org/c/jjb/jenkins-job-builder/+/601323
Change-Id: Ie7553ff310e844bbe912b694b09f97450c609491
Signed-off-by: Pat Long <pllong@arista.com>
Add a missing extension to git scm which enables the option to do
"Git LFS pull after checkout"
Add lfs-pull fixtures
Change-Id: Ie8b98877f3f282ac0b32dbeb089e6d0d9ccc25c8
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
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
The gerrit-code-review-plugin v0.4.0 introduces the
integration with Gerrit Checks plugin. Introduce the option
to query for pending checks.
Change-Id: Idb3f290121aa6fbcdc25a0821c9bdc3dd03e21af
The GerritSCMSource type for the multibranch pipeline does not
belong to the 'gerrit' plugin but rather to the 'gerrit-code-review'
plugin.
Change-Id: I5edd81a3506847c3e5910ad66d4498a2b8c899e9
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>
This commit adds the ability to filter discovered branches in a multibranch project using a regex filter.
This is done by adding a 'head-filter-regex' key in the github scm configuration inside the multibranch job yaml - it maps to a <jenkins.scm.impl.trait.RegexSCMHeadFilterTrait>
element containing a <regex> element in the resulting job.
Change-Id: I8c88a8b131cdc51d2c8abb13397637ebbf6d1373
Signed-off-by: amit lin <amitl@totango.com>
My previous submission added support for property strategy: all branches
get the same properties. This patch adds support for the second of 2
options, "named branches get different properties", which allows for
a default definition of properties + exceptions for individual refspecs
based on their literal branch name. Also includes some re-org of the
existing prop. strat. support in order to DRY up the code for both.
Also adds sphinx.ext.doctest to docs/src/conf.py extensions to allow for
running `make doctest` locally.
Change-Id: Icd143fe25b1e2d5c8d1e7e8b0650d91f40838043
Signed-off-by: sbussetti <steve.bussetti@gmail.com>
Multibranch pipeline jobs also support "Property Strategy" elements.
These are fairly limited, but do contain the very useful "Suppress
automatic SCM triggering" trait. This commit adds support for
defining these for the "All branches get the same properties"
strategy, and could be easily amended to also support the "Named
branches get different properties" strategy in a future update.
Change-Id: I3d9281657e341260a23f357f6e247793379b0eed
Signed-off-by: sbussetti <steve.bussetti@gmail.com>
Jenkins2 GitHub scms default to automatically sending updates on build
status to github for pull requests. The plugin this enables allows
control of this by enabling or disabling the feature via an SCM trait,
allowing you to either no notify at all or manually notify via other
means.
Change-Id: I4f5629c3ee8031d41054e3be5e853201d8f0fed6
Signed-off-by: sbussetti <steve.bussetti@gmail.com>
Same as existing bitbucket checkout-over-ssh
ssh-checkout for github must needs the option
for a user to specify the id of the secret
containing the ssh credentials to be used
for checkout.
Change-Id: I675c94c971e78d6ecd71d6f1446e0388430dab80
Signed-off-by: sbussetti <steve.bussetti@gmail.com>