From 48ab60c6dba5770fa6e58176c77f2b8a8abdc241 Mon Sep 17 00:00:00 2001 From: Kevin de Berk Date: Mon, 18 Jun 2018 15:15:15 +0200 Subject: [PATCH] multibranch-bitbucket: Configure server address If the field is not specified, the value will not appear in the XML. The value is then decided by the Jenkins configuration. Change-Id: Ic373069ea916327778fb2fe567ddf578f03abd9e --- jenkins_jobs/modules/project_multibranch.py | 2 ++ tests/multibranch/fixtures/scm_bitbucket_full.xml | 1 + tests/multibranch/fixtures/scm_bitbucket_full.yaml | 1 + 3 files changed, 4 insertions(+) diff --git a/jenkins_jobs/modules/project_multibranch.py b/jenkins_jobs/modules/project_multibranch.py index d6447cb8c..b134590c2 100644 --- a/jenkins_jobs/modules/project_multibranch.py +++ b/jenkins_jobs/modules/project_multibranch.py @@ -298,6 +298,7 @@ def bitbucket_scm(xml_parent, data): :arg bool discover-tags: Discovers tags on the repository. (default false) + :arg str server-url: The address of the bitbucket server. (optional) Minimal Example: @@ -323,6 +324,7 @@ def bitbucket_scm(xml_parent, data): mapping_optional = [ ('credentials-id', 'credentialsId', None), + ('server-url', 'serverUrl', None), ] helpers.convert_mapping_to_xml( source, data, mapping_optional, fail_required=False) diff --git a/tests/multibranch/fixtures/scm_bitbucket_full.xml b/tests/multibranch/fixtures/scm_bitbucket_full.xml index 9a4b78a96..08f8582bb 100644 --- a/tests/multibranch/fixtures/scm_bitbucket_full.xml +++ b/tests/multibranch/fixtures/scm_bitbucket_full.xml @@ -36,6 +36,7 @@ SANDBOX test secret + https://bitbucket.example.com:8080 diff --git a/tests/multibranch/fixtures/scm_bitbucket_full.yaml b/tests/multibranch/fixtures/scm_bitbucket_full.yaml index 50138255f..dca18493d 100644 --- a/tests/multibranch/fixtures/scm_bitbucket_full.yaml +++ b/tests/multibranch/fixtures/scm_bitbucket_full.yaml @@ -5,4 +5,5 @@ scm: credentials-id: 'secret' repo-owner: 'SANDBOX' repo: 'test' + server-url: https://bitbucket.example.com:8080 discover-tags: true