Skip to content
Merged
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
26 changes: 21 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,18 @@ pipeline {
environment {
scannerHome = tool 'SonarQubeScanner'
}
// Scanning runs on dependabot core update and non-dependabot branches
// Scanning runs on PRs (except dependabot for non-core updates) and primary branch
when {
anyOf {
branch pattern: /^dependabot.*(?i)(ibm)[\.-].+sdk-core.*$/, comparator: 'REGEXP'
not {
branch 'dependabot*'
changeRequest()
expression { env.BRANCH_IS_PRIMARY }
}
not {
allOf {
changeRequest branch: 'dependabot*', comparator: 'GLOB'
not {
changeRequest branch: /^dependabot.*(?i)(ibm)[\.-].+sdk-core.*$/, comparator: 'REGEXP'
}
}
}
}
Expand All @@ -82,6 +88,11 @@ pipeline {
}
}
stage('Publish[staging]') {
when {
not {
buildingTag()
}
}
environment {
STAGE_ROOT = "${ARTIFACTORY_URL_UP}/api/"
}
Expand All @@ -105,6 +116,11 @@ pipeline {
}
}
stage('Run Gauge tests') {
when {
not {
buildingTag()
}
}
steps {
script {
buildResults = null
Expand Down Expand Up @@ -270,7 +286,7 @@ void defaultInit() {

scanCode = {
withSonarQubeEnv(installationName: 'SonarQubeServer') {
sh "${scannerHome}/bin/sonar-scanner -Dsonar.qualitygate.wait=true -Dsonar.projectKey=cloudant-${libName}-sdk -Dsonar.branch.name=${env.BRANCH_NAME} -Dsonar.exclusions=examples/**"
sh "${scannerHome}/bin/sonar-scanner -Dsonar.qualitygate.wait=true -Dsonar.projectKey=cloudant-${libName}-sdk -Dsonar.exclusions=examples/**"
}
}
}
Expand Down