ium_s487178/Jenkinsfile

35 lines
977 B
Plaintext
Raw Normal View History

2023-03-25 13:38:35 +01:00
pipeline {
2023-04-05 22:10:14 +02:00
agent any
stages {
stage('Checkout') {
steps {
git branch: 'master', url: 'https://git.wmi.amu.edu.pl/s487178/ium_s487178.git'
}
}
stage('Build Docker image') {
steps {
2023-04-12 22:19:33 +02:00
sh 'docker build -t ium_s487178 -f dockerfile3 .'
2023-04-05 22:10:14 +02:00
}
}
2023-04-05 22:19:12 +02:00
2023-04-05 22:28:19 +02:00
stage('Run command in Docker container') {
2023-04-05 22:10:14 +02:00
steps {
2023-04-12 21:53:48 +02:00
script {
def csv_filename = 'body_performance_processed.csv'
2023-04-12 21:59:32 +02:00
sh "docker run -v ${env.WORKSPACE}/artifacts:/app/artifacts ium_s487178 python3 ./python_dataset_create.py"
2023-04-12 22:04:31 +02:00
if (fileExists("artifacts/${csv_filename}")) {
2023-04-12 23:13:35 +02:00
archiveArtifacts artifacts: "artifacts/${csv_filename}"
2023-04-12 21:53:48 +02:00
}
2023-04-16 18:03:55 +02:00
sh "ls -l ./artifacts"
2023-04-12 21:53:48 +02:00
}
2023-04-05 22:10:14 +02:00
}
}
}
2023-04-05 22:30:44 +02:00
post {
always {
archiveArtifacts 'output.txt'
}
}
2023-03-25 13:38:35 +01:00
}