ci(jenkins): disable stages for only docs
@@ -61,16 +61,25 @@ pipeline {
deleteDir()
gitCheckout(basedir: "${BASE_DIR}", githubNotifyFirstTimeContributor: true)
stash allowEmpty: true, name: 'source', useDefaultExcludes: false
+ script {
+ dir("${BASE_DIR}"){
+ // Skip all the stages except docs for PR's with asciidoc and md changes only
+ env.ONLY_DOCS = isGitRegionMatch(patterns: [ '.*\\.(asciidoc|md)' ], shouldMatchAll: true)
+ }
+ }
}
}
stage('Sanity checks') {
when {
beforeAgent true
+ allOf {
+ expression { return env.ONLY_DOCS == "false" }
anyOf {
not { changeRequest() }
expression { return params.Run_As_Master_Branch }
}
}
+ }
steps {
withGithubNotify(context: 'Sanity checks', tab: 'tests') {
deleteDir()
@@ -95,8 +104,11 @@ pipeline {
options { skipDefaultCheckout() }
when {
beforeAgent true
+ allOf {
+ expression { return env.ONLY_DOCS == "false" }
expression { return params.tests_ci }
}
+ }
steps {
withGithubNotify(context: 'Test', tab: 'tests') {
deleteDir()
@@ -139,8 +151,11 @@ pipeline {
}
when {
beforeAgent true
+ allOf {
+ expression { return env.ONLY_DOCS == "false" }
expression { return params.package_ci }
}
+ }
steps {
withGithubNotify(context: 'Building packages') {
deleteDir()
@@ -158,11 +173,14 @@ pipeline {
agent none
when {
beforeAgent true
+ allOf {
+ expression { return env.ONLY_DOCS == "false" }
anyOf {
changeRequest()
expression { return !params.Run_As_Master_Branch }
}
}
+ }
steps {
build(job: env.ITS_PIPELINE, propagate: false, wait: false,
parameters: [string(name: 'INTEGRATION_TEST', value: 'Python'),
