IUM_04 - update Jenkinsfile - fix
This commit is contained in:
parent
dc66d33ab9
commit
1ef2173f25
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
@ -1,5 +1,10 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
filename 'Dockerfile'
|
||||||
|
reuseNode true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
password (
|
password (
|
||||||
@ -20,24 +25,20 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Clone repository') {
|
stage('Checkout repository') {
|
||||||
steps {
|
steps {
|
||||||
checkout scm
|
checkout scm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Build Docker image') {
|
|
||||||
steps {
|
|
||||||
docker.build("create-dataset-s464863")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Download dataset and preprocess data') {
|
stage('Download dataset and preprocess data') {
|
||||||
steps {
|
steps {
|
||||||
docker.image('create-dataset-s464863').withRun('"-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME}"','"-e KAGGLE_KEY=${params.KAGGLE_KEY}"','"-e CUTOFF=${params.CUTOFF}"') {
|
script {
|
||||||
sh "chmod +x ./download_dataset.py"
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
||||||
sh "python3 ./download_dataset.py ${params.CUTOFF}"
|
sh "chmod +x ./download_dataset.py"
|
||||||
archiveArtifacts artifacts: 'datasets/*', onlyIfSuccessful: true
|
sh "python3 ./download_dataset.py ${params.CUTOFF}"
|
||||||
|
archiveArtifacts artifacts: 'datasets/*', onlyIfSuccessful: true sh "python preprocess.py --cutoff ${params.CUTOFF}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user