pipeline { agent any stages { stage('Checkout') { steps { checkout scm } } stage('CopyArtifacts'){ steps { copyArtifacts fingerprintArtifacts: true, projectName: 'z-s487186-create-dataset', selector: lastSuccessful() } } stage('Script') { steps { sh './script2.sh > output.txt' } } stage('ArchiveArtifacts') { steps { archiveArtifacts 'output.txt' } } } }