Don't fail the build if build scan publishing fails

This commit is contained in:
Christian Beikov 2024-05-21 13:21:02 +02:00
parent cf23888fab
commit 0f8ef48e7b
3 changed files with 6 additions and 1 deletions

View File

@ -98,6 +98,8 @@ jobs:
run: ./ci/build-github.sh
shell: bash
- name: Publish Develocity build scan for previous build
# Don't fail a build if publishing fails
continue-on-error: true
if: "${{ !cancelled() && github.event_name == 'pull_request_target' && github.repository == 'hibernate/hibernate-orm' }}"
run: |
./gradlew buildScanPublishPrevious

View File

@ -106,6 +106,8 @@ jobs:
run: ./ci/build-github.sh
shell: bash
- name: Publish Develocity build scan for previous build (pull request)
# Don't fail a build if publishing fails
continue-on-error: true
if: "${{ !cancelled() && github.event_name == 'pull_request_target' && github.repository == 'hibernate/hibernate-orm' }}"
run: |
./gradlew buildScanPublishPrevious

3
Jenkinsfile vendored
View File

@ -259,7 +259,8 @@ void ciBuild(buildEnv, String args) {
withCredentials([string(credentialsId: 'ge.hibernate.org-access-key-pr',
variable: 'DEVELOCITY_ACCESS_KEY')]) {
withGradle { // withDevelocity, actually: https://plugins.jenkins.io/gradle/#plugin-content-capturing-build-scans-from-jenkins-pipeline
sh './gradlew buildScanPublishPrevious'
// Don't fail a build if publishing fails
sh './gradlew buildScanPublishPrevious || true'
}
}
})