2022-03-21 11:13:00 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
2022-03-27 17:43:59 +02:00
|
|
|
parameters {
|
|
|
|
string(
|
2022-03-27 22:50:43 +02:00
|
|
|
defaultValue: 'szymonparafinski',
|
2022-03-27 17:43:59 +02:00
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
2022-03-21 11:13:00 +01:00
|
|
|
)
|
2022-03-27 17:43:59 +02:00
|
|
|
password(
|
2022-03-27 22:50:43 +02:00
|
|
|
defaultValue: 'a95757bcf7f0def396b5294d971bf6dd',
|
2022-03-27 17:43:59 +02:00
|
|
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
|
|
|
name: 'KAGGLE_KEY'
|
|
|
|
)
|
|
|
|
string(
|
|
|
|
defaultValue: '1',
|
|
|
|
description: 'Cutoff lines',
|
|
|
|
name: 'CUTOFF'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
environment {
|
|
|
|
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
|
|
|
|
KAGGLE_KEY="$params.KAGGLE_KEY"
|
|
|
|
CUTOFF="$params.CUTOFF"
|
|
|
|
}
|
2022-03-21 11:13:00 +01:00
|
|
|
stages {
|
2022-03-27 22:45:53 +02:00
|
|
|
stage('Checkout'){
|
2022-03-27 17:43:59 +02:00
|
|
|
steps {
|
2022-03-27 23:04:41 +02:00
|
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444018', url: 'https://git.wmi.amu.edu.pl/s444018/ium_444018.git']]])
|
2022-03-27 17:43:59 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-27 22:15:24 +02:00
|
|
|
stage('Script'){
|
2022-03-27 17:43:59 +02:00
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
|
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
|
|
|
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
2022-03-27 22:12:40 +02:00
|
|
|
sh 'kaggle datasets list'
|
2022-03-27 17:50:53 +02:00
|
|
|
}
|
2022-03-27 17:43:59 +02:00
|
|
|
}
|
2022-03-27 22:45:53 +02:00
|
|
|
sh './download.sh $CUTOFF'
|
2022-03-27 23:01:25 +02:00
|
|
|
archiveArtifacts artifacts: 'imdb_top_1000_dev.csv, imdb_top_1000_test.csv, imdb_top_1000_train.csv', followSymlinks: false
|
2022-03-27 22:45:53 +02:00
|
|
|
}
|
2022-03-27 17:43:59 +02:00
|
|
|
}
|
|
|
|
}
|
2022-03-27 22:15:24 +02:00
|
|
|
}
|