77 Commits

Author SHA1 Message Date
Yolande Amate
4ee8581e38
Update tfs to use convert_mapping_to_xml()
Change-Id: Iec3972d2f16e660759b9eeaedb26bddea2ff21a6
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2017-10-23 14:25:31 -04:00
Jenkins
bfa1ae56eb Merge "Add Support for a list of additional-credentials in the SVN-plugin" 2017-10-06 15:07:50 +00:00
Jacqueline Haefke
88e4dfdc2c Add Support for a list of additional-credentials in the SVN-plugin
Since the 30.01.2017 the SVN plugin support additional-credentials, but the jenkins-job-builder can't generate this part:

<additionalCredentials>
     <hudson.scm.SubversionSCM_-AdditionalCredentials>
        <realm>...</realm>
        <credentialsId>...</credentialsId>
     </hudson.scm.SubversionSCM_-AdditionalCredentials>
     <hudson.scm.SubversionSCM_-AdditionalCredentials>
        <realm>...</realm>
        <credentialsId>...</credentialsId>
     </hudson.scm.SubversionSCM_-AdditionalCredentials>
</additionalCredentials>

Now you have optional 'additional-credentials' parameters.

Change-Id: I801cada4bd630242a216a1facc4abfc8d5378bcf
Task:4884
Story:2001152
2017-10-06 10:08:32 +02:00
Yolande Amate
5541b319bc Update cvs to use convert_mapping_to_xml()
Change-Id: I0fb5426865f0b116491ece745442f7d2fa8d290b
2017-08-11 22:31:13 +01:00
Bao Nguyen
badab02647 Add do-not-fetch-tags to CloneOption for Git
In one of the recent change to Git plugin behavior[1], tags are
also search as part of branches.

This cause projects that build on all branches to also build on all
tags.

This change allowing for tags to be ignored.

Default this option is false and missing from XML output.

[1] https://github.com/jenkinsci/git-plugin/pull/340
[2] bfeda3e661

Change-Id: I2ed2290f9ef8ecd0d9e96aad1d7cbce2964bf2da
2017-06-11 10:36:33 -07:00
Azat Khuzhin
9e51beb804 scm: introduce parent-credentials for git submodules
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>
2017-04-04 14:00:16 +03:00
Jenkins
7e3edde3dc Merge "Prevent creation of empty parameters for Repo" 2017-02-22 01:23:56 +00:00
Nikolas Sepos
d4418907d9 Add Dimensions SCM support
Change-Id: I6a8247ef42f9fba6f619e6cbd07726c3bb704e56
2017-01-27 20:00:47 +02:00
Simon Kuhnle
3607646fac Prevent creation of empty parameters for Repo
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 a34bd67ef74afe7a08e069710a827797073faa51.
Before that change, empty strings did not generate XML entries.

Change-Id: Ia66845cb71b01c8e26285ed2eabb1ef32622e3e1
Story: 2000727
2017-01-26 10:59:38 +01:00
Darragh Bailey
4573b3a25d Refactor base test classes inheritance for reuse
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
2016-09-14 14:58:57 +01:00
Jenkins
276e519395 Merge "SCM repo: add ignore-projects option" 2016-07-19 17:06:50 +00:00
Kien Ha
23738de4a2 Update OpenShift Pipeline plugin
- Update convert_mapping_to_xml to use fail_required=True argument
- Update documentations to have default options

Change-Id: Icb1435f76276ef9e7dd8a84506ca7f9cbf90a853
Signed-off-by: Kien Ha <kienha9922@gmail.com>
2016-07-18 19:12:44 -04:00
Jenkins
8f33a3f087 Merge "Update Git SCM so that extensions are configured correctly." 2016-06-15 14:25:39 +00:00
Lucas Dutra Nunes
0791f9724a SCM repo: add ignore-projects option
Change-Id: I4468b699fa86d0790dbb01457d2e67e276740940
Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
2016-06-14 14:06:48 -03:00
Jeff Grafton
cdfeb7bf66 Update Git SCM so that extensions are configured correctly.
Many configuration options have been extensions for at least 2 years, so
update the generated XML to actually configure these options.

Change-Id: Ic22ca4a6b8d61c977979a5eb63a2e884dc4391bd
2016-06-06 13:35:04 -07:00
Ryo Tagami
c28ac736be Fix Multiple SCMs Plugin child XML format
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>
2016-05-11 14:19:07 +09:00
Adam Kaufman
c50171b1b9 Add support for URL scm plugin
Allows for watching for changes in an artifact from a given url

Change-Id: I4debc2c6589962497a746f951a54857c8507ea02
2016-04-27 04:17:21 +08:00
Jenkins
e3c5203bc1 Merge "add reference-repo option to scm git submodule" 2016-02-25 19:30:09 +00:00
Jenkins
ef50e8c20f Merge "SCM repo: add show-all-changes option" 2016-02-25 19:01:44 +00:00
Jenkins
44dcbbe802 Merge "SCM repo: add trace option" 2016-02-25 19:01:29 +00:00
Jenkins
57898442bc Merge "SCM repo: add no-tags option" 2016-02-25 19:01:03 +00:00
Jenkins
64bd51dcd6 Merge "SCM repo: add reset-first option" 2016-02-25 19:00:16 +00:00
Jenkins
eee063d4b2 Merge "SCM repo: add depth option" 2016-02-25 18:59:18 +00:00
Jenkins
3954224c78 Merge "SCM repo: add force-sync option" 2016-02-25 18:58:53 +00:00
Lucas Dutra Nunes
48e34564da SCM repo: add show-all-changes option
Change-Id: I6260808fe1c845aaed500712e97cd72f5b6c8fa3
Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
2016-02-18 16:22:03 -02:00
Lucas Dutra Nunes
c0cf8b2b90 SCM repo: add trace option
Change-Id: Ie347f453dd3b677c343d3682b8e1f5c87cf93c27
Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
2016-02-18 16:22:03 -02:00
Lucas Dutra Nunes
856fc9b354 SCM repo: add no-tags option
Change-Id: I5c448776277afa4acbec71fa0a6f38286fe3401b
Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
2016-02-18 16:22:03 -02:00
Lucas Dutra Nunes
993e82a409 SCM repo: add reset-first option
Change-Id: Iafb79bb98ac3863f996027caa9136725cc59e973
Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
2016-02-18 16:22:03 -02:00
Lucas Dutra Nunes
e5d291b79b SCM repo: add depth option
Change-Id: I056ca2e6eedfb6915338e654597ae562d89a6295
Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
2016-02-18 16:21:57 -02:00
Lucas Dutra Nunes
ee3c59775d SCM repo: add force-sync option
Change-Id: I232d45f4066c0ac2b3cddce9ca99a9a02903813a
Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
2016-02-15 13:28:17 -02:00
Christian Rodemeyer
66b7f4d907 add reference-repo option to scm git submodule
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
2016-02-14 10:30:56 +01:00
Ari LiVigni
96065cc4e4 Updated to support changes to openshift pipeline plugin
- Documentation updated with correct links and options
- New openshift-creator builder added
- Two new publishers openshift-build-canceller and openshift-deploy-canceller
- Added verbose option to all existing builders and scm

Change-Id: I63f19bec6ea8a2344f48d59ad751a8bc5c3be9eb
2016-01-06 11:37:53 -05:00
Darragh Bailey
8805a34c0f Reorder imports to match hacking guidelines
Ensure that the imports follow the standard OpenStack hacking
guidelines.

Change-Id: Iaa4326aef118ddfd807dd006934f1d9ca80a1cfa
2015-12-23 15:23:42 -08:00
Daniel Watkins
860f6ffec5 Implement bzr SCM module.
Change-Id: Iee9c42a742b4062cb4756d16e5978905e115f13f
2015-12-19 16:15:20 +00:00
Jenkins
4eb33b2595 Merge "Make git.timeout parameter set clone timeout too." 2015-11-12 19:00:11 +00:00
Paul Sokolovsky
ff248cdfc7 Make git.timeout parameter set clone timeout too.
Git plugin has few fine-grained timeout settings, with jenkins-job-builder
setting only checkout timeout. Make the same timeout apply for clone
operations too.

Based on https://storyboard.openstack.org/#!/story/2000372

Change-Id: Id01d413bef7ffa3a069cc1000c923e1bd9ad9ff5
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2015-10-28 16:07:41 +03:00
Ari LiVigni
101f74645d Made a common helper function - convert_mapping_to_xml
This will allow other modules to convert a mapping set to xml easily
with defaults so other methods don't have to create their own.

Includes behaviour to selectively omit or include empty tags.

Behaviour for default value:
  None - omit this tag if users didn't put anything
  "" - create an empty element if users didn't put anything

This is applied to the existing openshift plugin functions in
refactoring as Jenkins actually retains an empty XML tag when the
optional 'auth-token' setting is missing from the input job definition.
Which results in modifying the default test's output for the openshift
plugin.

Change-Id: I935a70ad191bc0f3f3dbd571b2b1cf7468106697
2015-10-09 17:47:01 +01:00
Jenkins
556deebe25 Merge "Implements: additions for OS3 plugin entry points in builders and scm" 2015-10-08 16:53:35 +00:00
Ari LiVigni
73c255d649 Implements: additions for OS3 plugin entry points in builders and scm
Add entry points for all builder and scm entry points for the
openshift3 plugin. Adds openshift-builder, openshift-build-verify,
openshift-deployer, openshift-dep-verify, openshift-img-tagger,
openshift-scaler, openshift-svc-verify, openshift-img-streams

Change-Id: I5d08ddd7eb09241869cf56a5ffdfcce6a0671a4c
2015-10-08 16:17:12 +01:00
Darragh Bailey
9bfbffa559 Capture logs with FakeLogging Fixture
Capture logs to attach them on exceptions to simplify the debugging of
errors in tests when they occur.

Change-Id: I5c1b5c306aba37789a8d41eabf65e0ac628af838
2015-09-30 16:25:22 +01:00
Jenkins
34ef0a2ff1 Merge "Support for CVS SCM using CVS plugin" 2015-09-08 08:33:49 +00:00
Jenkins
5ce1b32e02 Merge "Allow whitespace to be significant" 2015-08-26 06:59:48 +00:00
Darragh Bailey
39df8466fd Reformat docstrings for SCM
Tidy up the docstrings to use consistent formatting, move inline
examples to tests and add urls for additional information on source code
web browsers.

Change-Id: I696389516dbd4e0960986666e32fab93e515710e
2015-08-25 09:38:24 -07:00
Somay Jain
139550d263 Support for CVS SCM using CVS plugin
Change-Id: Ic22eeda217ab902e2bf9ca2aa5637706fdfe6943
2015-08-18 18:26:22 -04:00
Darragh Bailey
e5738d0852 Allow whitespace to be significant
Remove the test options suppressing ignoring differences in whitespace
outputted in the XML to allow capturing of issues where the code
incorrectly adds or removes significant whitespace.

Add a helper function to deal with the edge case of parsing XML directly
that contains non significant whitespace to avoid accidentally adding
excess whitespace when minidom outputs the resulting document.

Change-Id: I9936042cd82c204ba2b3c19f575703e33564f7fd
2015-08-11 18:31:48 +01:00
Jenkins
f3967adcc9 Merge "configure git PathRestriction as an extension" 2015-07-31 22:46:51 +00:00
Jenkins
d7add10803 Merge "scm svn: add support for viewvc-url" 2015-07-26 16:28:47 +00:00
Chris Burroughs
1fe7f9cc83 configure git PathRestriction as an extension
The git plugin restructured PathRestriction moved to an extension in
2013 or so.  Backwards compatibility code
(GitSCMBackwardCompatibility) kept the old xml working, but it is
cleaner if what jenkins-job-builder emits matches what jenkins uses.

Change-Id: I7f34a650586ba394eed4db345d8ce831d5791559
2015-07-14 10:42:25 -04:00
Somay Jain
b7f491897c Support for more extensions and options in Git plugin
Added the support for the following -
* strategy and ff_mode in merge before build extension
* more options for repository browsers
* sparse checkout path extension
* ignore commits with certain messages extension
* force polling using workspace extension
* force push option for git publisher

Change-Id: I1fd5b73de32f3a4c10c89dacdddb377378c4128d
2015-07-13 18:47:20 +05:30
Somay Jain
c20570f9d6 Support for repo-depth and ignore-externals in svn plugin
Change-Id: I5f35536a936bde33b0a8c710b28ac5e81fcc6c8b
2015-07-13 17:55:56 +05:30