From 0609abeb7ace77233b47858090bba39fd8e00114 Mon Sep 17 00:00:00 2001 From: Jakub Henyk Date: Tue, 28 Mar 2023 13:46:32 +0200 Subject: [PATCH] changed Jenkinsfile_2 --- Jenkinsfile_2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile_2 b/Jenkinsfile_2 index 690bc1a..e282d4a 100644 --- a/Jenkinsfile_2 +++ b/Jenkinsfile_2 @@ -11,21 +11,25 @@ pipeline { stages { stage('Load Artifact') { steps { + script { copyArtifacts fingerprintArtifacts: true, projectName: 's452627-create-dataset', selector: buildParameter("BUILD_SELECTOR") + def previousFile = readFile(file: "output.txt") + echo("The previous build artifact was: ${previousFile}") + } } } stage('Run Script') { steps { script { sh "chmod +x -R ${env.WORKSPACE}" - sh './make_statistic.sh | tee output.txt' + sh './make_statistic.sh | tee output_statistic.txt' } } } stage('Archive Output') { steps { - archiveArtifacts 'output.txt' + archiveArtifacts 'output_statistic.txt' } } }