ium_z487177/Jenkinsfile-create-dataset

38 lines
926 B
Plaintext

pipeline {
agent any
parameters {
string(name: 'KAGGLE_USERNAME', defaultValue: 'reyvan123', description: 'Kaggle username')
password(name: 'KAGGLE_KEY', defaultValue: '', description: 'Kaggle API key')
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Install Kaggle CLI') {
steps {
sh 'pip install kaggle'
}
}
stage('Run Shell Script') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh 'chmod +x script.sh'
sh './script.sh'
}
}
}
stage('Archive Artifacts') {
steps {
archiveArtifacts artifacts: 'output.txt', fingerprint: true
}
}
}
}