diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2018-10-05 23:09:05 +0530 |
---|---|---|
committer | Thanh Ha <zxiiro@gmail.com> | 2019-04-09 16:18:51 +0800 |
commit | e6398cf3733e9306999596b74d8810a9334dd8fc (patch) | |
tree | f979192bbd634f257022393a0d5a5abd450f52f5 /tests | |
parent | ec3080b5bc1681ef2232796d3a009d11e2659b3f (diff) | |
download | python-jenkins-job-builder-e6398cf3733e9306999596b74d8810a9334dd8fc.tar.gz python-jenkins-job-builder-e6398cf3733e9306999596b74d8810a9334dd8fc.tar.xz python-jenkins-job-builder-e6398cf3733e9306999596b74d8810a9334dd8fc.zip |
Set reference repo under clone options
When we have cloneOptions in the generated with options like
tags and reference filled outside of cloneOptions,
The reference is not filled in the job configuration and this
option will not work as expected. reference should
alwasy be listed inside CloneOptions.
Change-Id: I519d3c42f1b32ab27243b0f5c592e3d41e3230bb
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scm/fixtures/git-extensions-reference-repo.xml | 35 | ||||
-rw-r--r-- | tests/scm/fixtures/git-extensions-reference-repo.yaml | 4 |
2 files changed, 39 insertions, 0 deletions
diff --git a/tests/scm/fixtures/git-extensions-reference-repo.xml b/tests/scm/fixtures/git-extensions-reference-repo.xml new file mode 100644 index 00000000..25e724dd --- /dev/null +++ b/tests/scm/fixtures/git-extensions-reference-repo.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<project> + <scm class="hudson.plugins.git.GitSCM"> + <configVersion>2</configVersion> + <userRemoteConfigs> + <hudson.plugins.git.UserRemoteConfig> + <name>origin</name> + <refspec>+refs/heads/*:refs/remotes/origin/*</refspec> + <url>https://example.com/project.git</url> + </hudson.plugins.git.UserRemoteConfig> + </userRemoteConfigs> + <branches> + <hudson.plugins.git.BranchSpec> + <name>**</name> + </hudson.plugins.git.BranchSpec> + </branches> + <disableSubmodules>false</disableSubmodules> + <recursiveSubmodules>false</recursiveSubmodules> + <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> + <remotePoll>false</remotePoll> + <gitTool>Default</gitTool> + <submoduleCfg class="list"/> + <reference>/path/to/reference/repo.git</reference> + <gitConfigName/> + <gitConfigEmail/> + <extensions> + <hudson.plugins.git.extensions.impl.CloneOption> + <shallow>false</shallow> + <depth>1</depth> + <reference>/path/to/reference/repo.git</reference> + </hudson.plugins.git.extensions.impl.CloneOption> + <hudson.plugins.git.extensions.impl.WipeWorkspace/> + </extensions> + </scm> +</project> diff --git a/tests/scm/fixtures/git-extensions-reference-repo.yaml b/tests/scm/fixtures/git-extensions-reference-repo.yaml new file mode 100644 index 00000000..24461d81 --- /dev/null +++ b/tests/scm/fixtures/git-extensions-reference-repo.yaml @@ -0,0 +1,4 @@ +scm: + - git: + url: https://example.com/project.git + reference-repo: /path/to/reference/repo.git |