pipeline { agent any stages { stage('Download') { steps { sh 'make config' sh 'echo "artifact file" > generatedFile.txt' } } } post { always { archiveArtifacts artifacts: 'generatedFile.txt', onlyIfSuccessful: true } } }