62 lines
1.9 KiB
Plaintext
62 lines
1.9 KiB
Plaintext
pipeline {
|
|
agent {
|
|
dockerfile {
|
|
filename 'lab4.dockerfile'
|
|
reuseNode true
|
|
}
|
|
}
|
|
|
|
|
|
parameters{
|
|
string(
|
|
defaultValue: 'mattkrawl',
|
|
description: 'Kaggle username',
|
|
name: 'KAGGLE_USERNAME',
|
|
trim: false
|
|
)
|
|
password(
|
|
defaultValue: 'c21878a7463faa44361330ffbcea68a6',
|
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
|
name: 'KAGGLE_KEY'
|
|
)
|
|
string(
|
|
defaultValue: '1000',
|
|
description: 'CUTOFF',
|
|
name: 'CUTOFF',
|
|
trim: false
|
|
)
|
|
}
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
checkout scmGit(
|
|
branches: [[name: '*/master']],
|
|
userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s458023/ium_458023.git']]
|
|
)
|
|
}
|
|
}
|
|
|
|
stage('Prepare data'){
|
|
steps{
|
|
//running Build
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
|
// downloading and unzipping kaggle dataset
|
|
sh 'echo "{\"username\":\"$KAGGLE_USERNAME\",\"key\":\"$KAGGLE_KEY\"}" > /.kaggle/kaggle.json'
|
|
sh './get-data.sh'
|
|
sh 'python3 prepare_dataset.py'
|
|
|
|
}
|
|
}
|
|
}
|
|
stage('Archive artifacts'){
|
|
steps{
|
|
withEnv(["CUTOFF=${params.CUTOFF}"]){
|
|
archiveArtifacts 'wines_test.csv'
|
|
archiveArtifacts 'wines_dev.csv'
|
|
archiveArtifacts 'wines_train.csv'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |