42 lines
1.2 KiB
Groovy
42 lines
1.2 KiB
Groovy
pipeline {
|
|
agent any
|
|
|
|
parameters {
|
|
string(name: 'KAGGLE_USERNAME', defaultValue: 'gulczas', description: 'Kaggle username')
|
|
password(name: 'KAGGLE_KEY', defaultValue: '', description: 'Kaggle API key')
|
|
string(name: 'CUTOFF', defaultValue: '90', description: 'Number of rows to cut')
|
|
}
|
|
|
|
stages {
|
|
stage('Clone Repository') {
|
|
steps {
|
|
git 'https://git.wmi.amu.edu.pl/s464953/ium_464953.git'
|
|
}
|
|
}
|
|
stage('Cleanup Artifacts') {
|
|
steps {
|
|
script {
|
|
sh 'rm -rf artifacts'
|
|
}
|
|
}
|
|
}
|
|
stage('Run Script') {
|
|
steps {
|
|
script {
|
|
withEnv([
|
|
"KAGGLE_USERNAME=${env.KAGGLE_USERNAME}",
|
|
"KAGGLE_KEY=${env.KAGGLE_KEY}"])
|
|
{
|
|
sh "bash ./download_dataset.sh ${params.CUTOFF}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
stage('Archive Artifacts') {
|
|
steps {
|
|
archiveArtifacts artifacts: 'artifacts/*', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|
|
}
|