mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
ci: do not re-checkout current branch
When tests are started manually (through the Jenkins webui), there is no PR associated with the job. That means the `git_since` and `ref` are equal. Trying to create a new branch named `ref` will not work, as the branch was already created when cloning the repository with `git_since`. With this change, Jenkins jobs can be started manually. This makes it possible to run regular/nightly jobs as well. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
e030097eaa
commit
8f84e592d5
@ -73,7 +73,9 @@ node('cico-workspace') {
|
||||
}
|
||||
|
||||
sh "git clone --depth=1 --branch='${git_since}' '${git_repo}' ~/build/ceph-csi"
|
||||
sh "cd ~/build/ceph-csi && git fetch origin ${ref} && git checkout -b ${ref} FETCH_HEAD"
|
||||
if (ref != git_since) {
|
||||
sh "cd ~/build/ceph-csi && git fetch origin ${ref} && git checkout -b ${ref} FETCH_HEAD"
|
||||
}
|
||||
}
|
||||
|
||||
stage('check doc-only change') {
|
||||
|
Reference in New Issue
Block a user