ium-s301654/Jenkinsfile

33 lines
809 B
Plaintext
Raw Normal View History

2024-04-03 09:35:02 +02:00
pipeline {
2024-04-10 10:05:01 +02:00
agent {
dockerfile true
}
parameters {
string (
defaultValue: 'my_username',
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/blob/main/docs/README.md#api-credentials',
name: 'KAGGLE_KEY'
)
}
volumes {
2024-04-10 10:13:40 +02:00
hostPath("~/.kaggle")
2024-04-10 10:05:01 +02:00
containerPath("/app/.kaggle")
}
stages {
stage('Kaggle') {
steps {
script {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
2024-04-03 09:35:02 +02:00
}
2024-04-10 10:05:01 +02:00
}
2024-04-10 10:13:40 +02:00
}
}