Update 'Jenkinsfile-Docker'

This commit is contained in:
Wojciech Mikołajski 2023-04-19 18:39:17 +02:00
parent 04f5a43577
commit 9e17a73911

View File

@ -27,19 +27,13 @@ node {
}
stage('Build Docker Image') {
def dockerImage = docker.build("create-dataset")
dockerImage.inside {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}",
"CUT = ${params.CUT}" ])
{
sh 'ls -l'
sh 'echo $KAGGLE_USERNAME'
sh 'kaggle datasets download -d mssmartypants/water-quality > output.txt'
sh 'unzip -o water-quality.zip >> output.txt'
sh 'python3 create_dataset.py $CUT >> output.txt'
archiveArtifacts artifacts: 'waterQuality.csv, output.txt'
}
}
{
sh 'docker run -v ${env.WORKSPACE}/artifacts:/app/artifacts python3 create_dataset.py $CUT'
}
archiveArtifacts artifacts: 'waterQuality.csv, output.txt'
}
}