37 lines
928 B
Plaintext
37 lines
928 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.gz', fingerprint: true
|
|
}
|
|
}
|
|
}
|
|
} |