mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
ci: skip mini-e2e for doc-only PRs
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
44d6b17aa7
commit
0e19f37f61
@ -4,6 +4,8 @@ def ci_git_repo = 'https://github.com/ceph/ceph-csi'
|
|||||||
def ci_git_branch = 'ci/centos'
|
def ci_git_branch = 'ci/centos'
|
||||||
def git_repo = 'https://github.com/ceph/ceph-csi'
|
def git_repo = 'https://github.com/ceph/ceph-csi'
|
||||||
def ref = "master"
|
def ref = "master"
|
||||||
|
def git_since = 'master'
|
||||||
|
def doc_change = 0
|
||||||
|
|
||||||
def ssh(cmd) {
|
def ssh(cmd) {
|
||||||
sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} '${cmd}'"
|
sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} '${cmd}'"
|
||||||
@ -16,6 +18,29 @@ node('cico-workspace') {
|
|||||||
changelog: false
|
changelog: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('checkout PR') {
|
||||||
|
if (params.ghprbPullId != null) {
|
||||||
|
ref = "pull/${ghprbPullId}/head"
|
||||||
|
}
|
||||||
|
if (params.ghprbTargetBranch != null) {
|
||||||
|
git_since = "${ghprbTargetBranch}"
|
||||||
|
}
|
||||||
|
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('check doc-only change') {
|
||||||
|
doc_change = sh(
|
||||||
|
script: "cd ~/build/ceph-csi && \${OLDPWD}/scripts/skip-doc-change.sh origin/${git_since}",
|
||||||
|
returnStatus: true)
|
||||||
|
}
|
||||||
|
// if doc_change (return value of skip-doc-change.sh is 1, do not run the other stages
|
||||||
|
if (doc_change == 1) {
|
||||||
|
currentBuild.result = 'SUCCESS'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
stage('reserve bare-metal machine') {
|
stage('reserve bare-metal machine') {
|
||||||
def firstAttempt = true
|
def firstAttempt = true
|
||||||
retry(30) {
|
retry(30) {
|
||||||
|
Loading…
Reference in New Issue
Block a user