From eb8e97bec8bc72af5662ff1ce554d90a543d4a96 Mon Sep 17 00:00:00 2001 From: Mateusz Kuc Date: Thu, 20 Apr 2023 20:12:24 +0200 Subject: [PATCH] added Jenkinsfile2 --- Jenkinsfile2 | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Jenkinsfile2 diff --git a/Jenkinsfile2 b/Jenkinsfile2 new file mode 100644 index 0000000..3c2b78a --- /dev/null +++ b/Jenkinsfile2 @@ -0,0 +1,55 @@ +pipeline{ + agent any + parameters{ + choice( + choices: ['lastSuccessful()','lastCompleted()','latestSavedBuild()'], + description: 'Which build to user for copying artifacts', + name: 'BUILD_SELECTOR' + ) + } + stages{ + stage('clear_all'){ + steps{ + // removing data + sh 'rm -rf ium_458023' + } + } + stage('checkout'){ + steps{ + // cloning repository + sh ' git clone https://git.wmi.amu.edu.pl/s458023/ium_458023' + } + } + stage('copy_artifacts'){ + steps{ + copyArtifacts filter: 'salaries_test.csv,salaries_dev.csv,salaries_train.csv', fingerprintArtifacts: true, projectName: 'z-s458023-create-dataset', selector: workspace() + } + } + stage('docker'){ + agent { + dockerfile { + filename 'second.dockerfile' + dir 'ium_458023' + reuseNode true + } + } + steps{ + sh 'ls -a' + sh 'python ./ium_458023/dataset-stats.py' + echo 'koniec' + archiveArtifacts 'salaries_test.csv' + archiveArtifacts 'salaries_dev.csv' + archiveArtifacts 'salaries_train.csv' + } + } + stage('Goodbye!') { + steps { + echo 'Goodbye!' + + archiveArtifacts 'dataset.csv' + + } + } + } + +} \ No newline at end of file