Update 'Jenkinsfile-create-dataset'
This commit is contained in:
parent
466be13232
commit
40f30dc7f0
@ -1,10 +1,6 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
KAGGLE_TOKEN = credentials('kaggle-token')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
@ -18,13 +14,19 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('Setup Kaggle Credentials') {
|
||||
steps {
|
||||
withCredentials([string(credentialsId: 'kaggle-api-key', variable: 'KAGGLE_KEY')]) {
|
||||
sh 'mkdir -p ~/.kaggle'
|
||||
sh 'echo \'{"username":"reyvan123","key":"\'$KAGGLE_KEY\'"}\' > ~/.kaggle/kaggle.json'
|
||||
sh 'chmod 600 ~/.kaggle/kaggle.json'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Run Shell Script') {
|
||||
steps {
|
||||
sh 'chmod +x script.sh'
|
||||
withCredentials([string(credentialsId: 'kaggle-token', variable: 'KAGGLE_TOKEN')]) {
|
||||
sh 'echo $KAGGLE_TOKEN > ~/.kaggle/kaggle.json'
|
||||
sh 'chmod 600 ~/.kaggle/kaggle.json'
|
||||
}
|
||||
sh './script.sh'
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user