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