Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ pipeline {
deleteDir()
gitCheckout(basedir: "${BASE_DIR}")
stashV2(name: 'source', bucket: "${JOB_GCS_BUCKET}", credentialsId: "${JOB_GCS_CREDENTIALS}")
dir("${BASE_DIR}"){
// Skip all the stages except check Go sources for changeset's with ^docs/*.md or ^.github only
setEnvVar('ONLY_DOCS', isGitRegionMatch(patterns: [ '(^docs/.*\\.md|^\\.github/.*)' ], shouldMatchAll: true).toString())
}
}
}
stage('Check Go sources') {
Expand All @@ -54,6 +58,9 @@ pipeline {
}
}
stage('Check integrations') {
when {
expression { return env.ONLY_DOCS == "false" }
}
Comment on lines +61 to +63
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packages have generated content in their README.md files, elastic-package lint or elastic-package check should be executed if doc files are changed, to ensure that the generated content hasn't been unexpectedly modified.

Maybe instead of having the condition here for the whole stage, it could be after the sh that runs elastic-package check below.

steps {
script {
dir("${BASE_DIR}/packages") {
Expand Down Expand Up @@ -115,7 +122,9 @@ pipeline {
}
post {
always {
publishCoverageReports()
whenTrue(env.ONLY_DOCS == "false") {
publishCoverageReports()
}
}
cleanup {
notifyBuildResult(prComment: true)
Expand Down