40 lines
1020 B
Plaintext
40 lines
1020 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: '6ff11ae7-4f4a-4cfb-834b-85bc92ecc85c', 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
|
|
}
|
|
}
|
|
}
|
|
} |