Add Jenkinsfile-dvc
This commit is contained in:
parent
8d19b52c10
commit
3f7b2ec7cf
41
Jenkinsfile-dvc
Normal file
41
Jenkinsfile-dvc
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
pipeline {
|
||||||
|
parameters {
|
||||||
|
string(
|
||||||
|
defaultValue: 'marcinkostrzewski',
|
||||||
|
description: 'Kaggle username',
|
||||||
|
name: 'KAGGLE_USERNAME',
|
||||||
|
trim: false
|
||||||
|
)
|
||||||
|
password(
|
||||||
|
defaultValue: '',
|
||||||
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||||
|
name: 'KAGGLE_KEY'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} -t s444409-create-dataset"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage("Run DVC") {
|
||||||
|
steps{
|
||||||
|
withCredentials([
|
||||||
|
sshUserPrivateKey(
|
||||||
|
credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18',
|
||||||
|
keyFileVariable: 'IUM_SFTP_KEY',
|
||||||
|
passphraseVariable: '',
|
||||||
|
usernameVariable: 'USER'
|
||||||
|
)
|
||||||
|
]) {
|
||||||
|
sh 'dvc remote modify --local ium_ssh_remote keyfile $IUM_SFTP_KEY'
|
||||||
|
sh 'dvc remote modify --local ium_ssh_remote password IUM@2021'
|
||||||
|
sh 'dvc pull'
|
||||||
|
sh 'dvc repro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user