added Jenkinsfile2

This commit is contained in:
Mateusz Kuc 2023-04-20 20:12:24 +02:00
parent e882cf7b66
commit eb8e97bec8
1 changed files with 55 additions and 0 deletions

55
Jenkinsfile2 Normal file
View File

@ -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'
}
}
}
}