Hi
I have a declarative script that is not archiving the build artefacts. The structure of the script is:
pipeline {
agent { label "sim07" }
options { buildDiscarder(logRotator(numToKeepStr: '20')) }
triggers {
pollSCM('H 20 * * 1-5')
}
stages {
stage('build_and_test') {
steps {
sh '''
/usr/bin/python3 -u my_regression_test.py
'''
}
post {
success {
emailext (subject: "${env.JOB_NAME}: Fixed!",
body: '${DEFAULT_CONTENT}',
recipientProviders: [[$class: 'CulpritsRecipientProvider']],
to: <snip>)
}
failure {
script{ emailext (subject: "${env.JOB_NAME}: Failure!",
body: '${DEFAULT_CONTENT}',
recipientProviders: [[$class: 'CulpritsRecipientProvider']],
to: <snip>)
}
}
unstable {
script{ emailext (subject: "${env.JOB_NAME}: Unstable!",
body: '${DEFAULT_CONTENT}',
to: <snip>)
}
}
always {
archiveArtifacts artifacts: '$WORKSPACE/RegressionTests/**/*.zip'
}
}
}
}
}
On the console output I see:
[Pipeline] archiveArtifacts
Archiving artifacts
[Pipeline] script
[Pipeline] {
[Pipeline] emailext
Sending email to: <snip>
[Pipeline] }
But no artefact files are listed (but they are present in the build directory).
Have I structured the ‘post’ section incorrectly?
Best regards
David
archiveArtifacts artifacts: '$WORKSPACE/RegressionTests/**/*.zip'
Thanks Björn
Removing $WORKSPACE/ fixed it.
Best regards
David
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/26229d4c-7cdc-46e5-b5c2-2b1221bcd69e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Click here to report this email as spam.