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>
settings-type parameter hides global-settings-type and makes it
impossible to use settings from the file and ConfigFileProvider at the
same time like:
maven:
settings-type: file
settings: mvn/settings.xml
global-settings-type: cfp
global-settings: test
Change-Id: Ieda05912ae8b28942d98150a51c92b2521f2b6bf
Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
This commit adds a parameter to the ansible builder, vault-credentials-id.
This maps to the element <vaultCredentialsId> in the resulting job
definition, and has been tested against the Jenkins Ansible plugin
v1.0.
Change-Id: I40cfd9225923b29c9d2714a60279f1c88f6cb88c
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>
The problem with `if default:` is that it evaluates int 0 to be
equivalent to False. If a user is passing in a int 0 then they
should be expected to receive int 0 in the case of defaults.
Change-Id: Ida1f4c68b6f9d1af5b98d633b552f038c57654cc
Signed-off-by: Thanh Ha <zxiiro@linux.com>
This resolves the error "TypeError: cannot serialize 1 (type int)" when
using a parameter inside of a macro and then passing an integer value
to the macro. For example:
- parameter:
name: int-param
parameters:
- string:
name: VAR_INT
default: '{var}'
- job-template:
name: int-param
parameters:
- int-param:
var: 1
Change-Id: Ie3a5d2e03b7aa0b7cafdb467cd0118e4ff6e73bc
Signed-off-by: Thanh Ha <zxiiro@linux.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>
Instead of printing the deprecation warning against every generated
config-xml file, print it only once at the beginning of the test
command call to not spam the console.
Change-Id: Ifdcdb1373d44ba6232ea7a5359662cc760353774
Signed-off-by: Thanh Ha <zxiiro@linux.com>
The code assumes that the value of cancel-builds-on-update is a boolean.
This fails when specifying the value of the param in a variable because when
deep_formatter formats the data, booleans turn into strings.
Also added tests for such case.
Change-Id: Ib1ec3d5545091be550bfe023e49c7982372d5b55
Signed-off-by: Daniel Belenky <daniel.belenky@gmail.com>
The random print statement does not provide any useful information
and spams the console output if a repo has many declared views with
uninteresting output.
Change-Id: I7f40730c753ec8f1145ba6144fe28bf97844b9e2
Signed-off-by: Thanh Ha <zxiiro@linux.com>
The 'release' phase was missed in the development of this feature.
Change-Id: Ia4660d6b8a86bb43e6ea38802e22c6a5ce06834c
Signed-off-by: Thanh Ha <zxiiro@linux.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>
This adds support for the job specific secret token in the
gitlab build trigger.
This feature was added to the "Gitlab Plugin" with version 1.4.1
(released Sep 24, 2016).
Excerpt from the changelog:
"Add possiblity to configure secret tokens per job to allow
only web hooks with the correct token to trigger builds."
Change-Id: Id1ede4a6a51a231f60a39bfaefbadd8f849076e4
This adds the 'publish-over-cifs' action to the builders module.
It enables the "Send files to a windows share" build step,
provided by the "Publish Over CIFS Plugin".
Change-Id: I80cb2f86091ef53a284cf85a381294bbb6133010
- upgrade flake8 to 3.6.0
- remove use of hacking since pre-commit replaced it
- mentioned minimal flake8 version on pre-commit config
- fixed newer linting errors
- disable W504 as it seems not possible to fix (conflict with W403)
- replaced buggy tox deps installation with native pip install, which
address the issue of missing to install new deps when the reqs files
are updated, developer being forced to to recreate the virtualenv.
- prepare for migration from tox-pep8 to tox-linters, now these being
just aliases.
Change-Id: I310578dce215aaf00a5b2d54716f90da9a1ecb4d
Depends-On: https://review.openstack.org/#/c/613726/
.venv was not a part of the .gitignore file and was showing up when
creating a virtual environment for developing with Jenkins Job Builder.
This patch adds .venv to the .gitignore file.
Change-Id: Ie32384290b9127759591a695cdfb5b0d6e740eb1
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>