2023-04-20 20:12:24 +02:00
|
|
|
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'
|
2023-04-20 20:31:05 +02:00
|
|
|
sh 'python ium_458023/dataset-stats.py'
|
|
|
|
echo 'koniec'
|
|
|
|
archiveArtifacts 'salaries_test.csv'
|
|
|
|
archiveArtifacts 'salaries_dev.csv'
|
|
|
|
archiveArtifacts 'salaries_train.csv'
|
2023-04-20 20:12:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Goodbye!') {
|
|
|
|
steps {
|
|
|
|
echo 'Goodbye!'
|
|
|
|
|
|
|
|
archiveArtifacts 'dataset.csv'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|