Add Test Logging
Some checks reported errors
andreas-personal/AndysAdguardHomeBlockList/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
Andreas Fahrecker 2024-04-10 18:57:55 +02:00
parent 7f4e0931f0
commit 0d64d09fa1

2
Jenkinsfile vendored
View File

@ -25,7 +25,9 @@ pipeline {
steps { steps {
script { script {
def causes = currentBuild.getBuildCauses() def causes = currentBuild.getBuildCauses()
echo "Build causes: ${causes}"
def causedByScmEvent = causes.any { it._class == 'hudson.triggers.SCMTrigger$SCMTriggerCause' } def causedByScmEvent = causes.any { it._class == 'hudson.triggers.SCMTrigger$SCMTriggerCause' }
echo "Caused by SCM event: ${causedByScmEvent}"
if (!causedByScmEvent) { if (!causedByScmEvent) {
echo 'Not triggered by SCM, continuing build' echo 'Not triggered by SCM, continuing build'
} else if (sh(script: 'git log -1 --pretty=format:"%an"', returnStdout: true).trim() == 'Jenkins') { } else if (sh(script: 'git log -1 --pretty=format:"%an"', returnStdout: true).trim() == 'Jenkins') {