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

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0d3410a9c9fc478989f86e0411da4d81%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.

Reply via email to