ium_z487177/Jenkinsfile-create-dataset

38 lines
902 B
Plaintext
Raw Normal View History

2023-04-16 16:35:06 +02:00
pipeline {
2023-04-19 19:10:17 +02:00
agent any
environment {
KAGGLE_TOKEN = credentials('kaggle-token')
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Install Kaggle CLI') {
steps {
sh 'pip install kaggle'
}
}
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'
}
}
stage('Archive Artifacts') {
steps {
archiveArtifacts artifacts: 'output.txt', fingerprint: true
}
}
}
2023-04-16 16:35:06 +02:00
}