ium_z487177/Jenkinsfile-create-dataset

40 lines
998 B
Plaintext

pipeline {
agent any
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Install Kaggle CLI') {
steps {
sh 'pip install kaggle'
}
}
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'
sh './script.sh'
}
}
stage('Archive Artifacts') {
steps {
archiveArtifacts artifacts: 'output.txt', fingerprint: true
}
}
}
}