forked from s464914/ium_464914
31 lines
1.1 KiB
Groovy
31 lines
1.1 KiB
Groovy
pipeline {
|
|
agent {
|
|
dockerfile {
|
|
args '-v /var/run/docker.sock:/var/run/docker.sock'
|
|
}
|
|
}
|
|
parameters {
|
|
string(name: 'KAGGLE_USERNAME', defaultValue: 'alicjaszulecka', description: 'Kaggle username')
|
|
password(name: 'KAGGLE_KEY', defaultValue:'', description: 'Kaggle Key')
|
|
string(name: 'CUTOFF', defaultValue: '100', description: 'cut off number')
|
|
}
|
|
stages {
|
|
stage('Git Checkout') {
|
|
steps {
|
|
checkout scm
|
|
}
|
|
}
|
|
stage('Build') {
|
|
steps {
|
|
script {
|
|
def customImage = docker.build("my-custom-image:${BUILD_NUMBER}", "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} .")
|
|
customImage.inside {
|
|
sh 'bash ./get_dataset.sh ${params.CUTOFF}'
|
|
}
|
|
}
|
|
archiveArtifacts artifacts: 'artifacts/*', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|
|
}
|