49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
pipeline {
|
|
agent any
|
|
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
git branch: 'master', url: 'https://git.wmi.amu.edu.pl/s487178/ium_s487178.git'
|
|
}
|
|
}
|
|
stage('Copy artifacts') {
|
|
steps {
|
|
copyArtifacts(projectName: 's487178-create-dataset', fingerprintArtifacts: true, filter: 'artifacts/*.csv', target: './')
|
|
// sh "ls -l"
|
|
// sh "ls -l ./artifacts"
|
|
}
|
|
}
|
|
stage('Copy csv file') {
|
|
steps {
|
|
// Copy the file from ./artifacts to ./
|
|
sh 'cp ./artifacts/body_performance_processed.csv ./'
|
|
|
|
// Add some debug steps to list the contents of the directories
|
|
sh 'ls -l ./artifacts'
|
|
sh 'ls -l ./'
|
|
}
|
|
}
|
|
/*
|
|
stage('Build Docker image') {
|
|
steps {
|
|
sh 'docker build -t ium_s487178 -f dockerfile3 .'
|
|
}
|
|
}
|
|
*/
|
|
stage('Run command in Docker container') {
|
|
steps {
|
|
// sh "docker run ium_s487178 python3 ./python_dataset_stats.py > output.txt"
|
|
script{
|
|
def localFilePath = "${WORKSPACE}/body_performance_processed.csv"
|
|
sh "docker run -v ${localFilePath}:/app/body_performance_processed.csv kubas99x/ium_s487178:1_1 python3 ./python_dataset_stats.py > output.txt"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
archiveArtifacts 'output.txt'
|
|
}
|
|
}
|
|
} |