2022-03-27 23:27:29 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
parameters {
|
|
|
|
string(
|
|
|
|
defaultValue: 'szymonparafinski',
|
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
|
|
|
)
|
|
|
|
password(
|
|
|
|
defaultValue: 'a95757bcf7f0def396b5294d971bf6dd',
|
|
|
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
|
|
|
name: 'KAGGLE_KEY'
|
|
|
|
)
|
|
|
|
string(
|
2022-03-28 09:09:52 +02:00
|
|
|
defaultValue: '500',
|
2022-03-27 23:27:29 +02:00
|
|
|
description: 'Cutoff lines',
|
|
|
|
name: 'CUTOFF'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
environment {
|
|
|
|
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
|
|
|
|
KAGGLE_KEY="$params.KAGGLE_KEY"
|
|
|
|
CUTOFF="$params.CUTOFF"
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Check out from version control'){
|
|
|
|
steps {
|
|
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444018', url: 'https://git.wmi.amu.edu.pl/s444018/ium_444018.git']]])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Script'){
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
|
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
|
|
|
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
|
|
|
sh 'kaggle datasets list'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sh 'echo Downloading dataset'
|
2022-03-28 08:18:28 +02:00
|
|
|
sh 'chmod +x download.sh'
|
2022-03-27 23:41:28 +02:00
|
|
|
sh './download.sh'
|
2022-03-27 23:27:29 +02:00
|
|
|
archiveArtifacts artifacts: 'imdb_top_1000_dev.csv, imdb_top_1000_test.csv, imdb_top_1000_train.csv', followSymlinks: false
|
|
|
|
}
|
|
|
|
}
|
2022-03-28 09:17:36 +02:00
|
|
|
|
2022-03-27 23:27:29 +02:00
|
|
|
}
|
|
|
|
}
|