52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
pipeline {
|
|
agent any
|
|
parameters {
|
|
buildSelector(
|
|
name: 'BUILD_SELECTOR',
|
|
description: 'Which build to use for copying artifacts',
|
|
defaultSelector: lastSuccessful()
|
|
)
|
|
}
|
|
stages {
|
|
stage('Checkout git clone') {
|
|
steps {
|
|
git branch: 'master', url: 'https://git.wmi.amu.edu.pl/s487174/ium_z487174.git'
|
|
}
|
|
}
|
|
stage('Copy dataset artifacts') {
|
|
steps {
|
|
copyArtifacts(
|
|
projectName: 'z-s487174-create-dataset',
|
|
fingerprintArtifacts: true,
|
|
selector: buildParameter('BUILD_SELECTOR')
|
|
)
|
|
}
|
|
}
|
|
// stage('Run a shell script in a docker container') {
|
|
// steps {
|
|
// // Uruchomienie kontenera Docker i przekazanie wyniku do pliku na hoście
|
|
// //sh 'docker run -v "$(pwd)":/app tomkos5/ium:v1 sh -c "chmod 777 /app/s487174-dataset-stats.sh > output.txt"'
|
|
// }
|
|
}
|
|
stage('Docker') {
|
|
agent {
|
|
docker {
|
|
image 'tomkos5/ium:latest'
|
|
reuseNode true
|
|
}
|
|
}
|
|
steps {
|
|
sh 'python ./ium_z487174/dataset-stats.py'
|
|
archiveArtifacts 'train_data_stats.csv'
|
|
archiveArtifacts 'dev_data_stats.csv'
|
|
archiveArtifacts 'test_data_stats.csv'
|
|
}
|
|
}
|
|
stage('Clear') {
|
|
steps {
|
|
sh 'rm -rf *'
|
|
}
|
|
}
|
|
}
|
|
}
|