Skip to content

Commit 955866f

Browse files
committed
embed get_os_distro call in script block
1 parent 91a57a6 commit 955866f

File tree

1 file changed

+27
-15
lines changed

1 file changed

+27
-15
lines changed

Jenkinsfile

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,10 @@ pipeline {
550550
post {
551551
success {
552552
// Allow empty results for 'osx/high-sierra' which doesn't produce packages
553-
def distro = get_os_distro()
554-
archiveArtifacts artifacts: "${distro}/**/libuv*", allowEmptyArchive: true
553+
script {
554+
def distro = get_os_distro()
555+
archiveArtifacts artifacts: "${distro}/**/libuv*", allowEmptyArchive: true
556+
}
555557
}
556558
}
557559
}
@@ -561,14 +563,18 @@ pipeline {
561563
}
562564
post {
563565
success {
564-
def distro = get_os_distro()
565-
archiveArtifacts artifacts: "${distro}/**/cassandra-*-tests"
566-
archiveArtifacts artifacts: "${distro}/**/dse-*-tests", allowEmptyArchive: true
566+
script {
567+
def distro = get_os_distro()
568+
archiveArtifacts artifacts: "${distro}/**/cassandra-*-tests"
569+
archiveArtifacts artifacts: "${distro}/**/dse-*-tests", allowEmptyArchive: true
570+
}
567571
}
568572
failure {
569-
def distro = get_os_distro()
570-
archiveArtifacts artifacts: "${distro}/**/CMakeOutput.log"
571-
archiveArtifacts artifacts: "${distro}/**/CMakeError.log"
573+
script {
574+
def distro = get_os_distro()
575+
archiveArtifacts artifacts: "${distro}/**/CMakeOutput.log"
576+
archiveArtifacts artifacts: "${distro}/**/CMakeError.log"
577+
}
572578
}
573579
}
574580
}
@@ -598,8 +604,10 @@ pipeline {
598604
}
599605
post {
600606
success {
601-
def distro = get_os_distro()
602-
archiveArtifacts artifacts: "${distro}/**/*-cpp-driver*"
607+
script {
608+
def distro = get_os_distro()
609+
archiveArtifacts artifacts: "${distro}/**/*-cpp-driver*"
610+
}
603611
}
604612
}
605613
}
@@ -757,9 +765,11 @@ pipeline {
757765
}
758766
post {
759767
failure {
760-
def distro = get_os_distro()
761-
archiveArtifacts artifacts: "${distro}/**/CMakeOutput.log"
762-
archiveArtifacts artifacts: "${distro}/**/CMakeError.log"
768+
script {
769+
def distro = get_os_distro()
770+
archiveArtifacts artifacts: "${distro}/**/CMakeOutput.log"
771+
archiveArtifacts artifacts: "${distro}/**/CMakeError.log"
772+
}
763773
}
764774
}
765775
}
@@ -774,8 +784,10 @@ pipeline {
774784
junit testResults: '*integration-tests-*-results.xml', allowEmptyResults: true
775785
}
776786
failure {
777-
def distro = get_os_distro()
778-
archiveArtifacts artifacts: "${distro}/**/*-integration-tests-driver-logs.tgz"
787+
script {
788+
def distro = get_os_distro()
789+
archiveArtifacts artifacts: "${distro}/**/*-integration-tests-driver-logs.tgz"
790+
}
779791
}
780792
cleanup {
781793
cleanWs()

0 commit comments

Comments
 (0)