No artifacts found

Hello,

I am new in 2.440.1 and created my first project, which basically consists of a Windows batch command creating artefacts in my project’s workspace directory.

My pipeline is as follows:

pipeline {
    agent none
    stages {
        stage('Example') {
            agent any
            options {
                // Timeout counter starts BEFORE agent is allocated
                timeout(time: 300, unit: 'SECONDS')
            }
            steps {
                bat 'c:\\PROGRA~1\\Cincom\\vw9.3.1\\bin\\win64\\visual.exe C:\\ProgramData\\Jenkins\\.jenkins\\jobs\\Evo_Base_9.3.1\\EvoBuilder.im  -doit  "Build.BaseBuilder loadActionsVW931"'

            }
        }
        stage('artifact') {
            agent any
            options {
                // Timeout counter starts BEFORE agent is allocated
                timeout(time: 300, unit: 'SECONDS')
            }
            steps {         
                archiveArtifacts artifacts: '\'**/*.im\'', followSymlinks: false
            }
        }
    }
}

The Windows batch command works fine and without artifact copying the build is successful.

In the log file however I get the following error:
ERROR: No artifacts found that match the file pattern “‘**/*.im’”. Configuration error?

And no artifact is copied with the build.

I tried all possible combinations of file patterns but nothing worked, it must be something different.

Thanks for your help.

Regards,

Maarten,

archiveArtifacts artifacts: ‘'**/*.im'’, followSymlinks: false

Try to put this line into to the same steps block above like this:
Or, make sure your “artifacts” behaviour is at the same workdir of one same agent.

pipeline {
    agent {label "IAR"}
    stages {
        stage('Example') {
            agent {label "IAR"}
            options {
                // Timeout counter starts BEFORE agent is allocated
                timeout(time: 300, unit: 'SECONDS')
            }
            steps {
                bat """
                    mkdir test
                    cd test
                    echo a>  a.log
                """
                
                archiveArtifacts artifacts: '**/*.log', followSymlinks: false

            }
        }
        // stage('artifact') {
        //     agent any
        //     options {
        //         // Timeout counter starts BEFORE agent is allocated
        //         timeout(time: 300, unit: 'SECONDS')
        //     }
        //     steps {         
        //         archiveArtifacts artifacts: '**/*.log', followSymlinks: false
        //     }
        // }
    }
}

Thank you very much Longkang,

This helped me out, it now all works :+1:

Maarten

1 Like