2021-05-07 20:16:31 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
parameters {
|
|
|
|
string(
|
|
|
|
defaultValue: '',
|
2021-05-07 23:03:14 +02:00
|
|
|
description: 'Umożliwia zdefiniowanie wielkości odcięcia zbioru danych.',
|
|
|
|
name: 'CUTOFF',
|
2021-05-07 20:16:31 +02:00
|
|
|
trim: false
|
|
|
|
)
|
|
|
|
string(
|
|
|
|
defaultValue: 'rokoch',
|
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
|
|
|
)
|
|
|
|
password(
|
|
|
|
defaultValue: '',
|
|
|
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
|
|
|
name: 'KAGGLE_KEY'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('checkout') {
|
|
|
|
steps {
|
|
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('docker') {
|
|
|
|
steps {
|
|
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
|
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
|
|
|
script {
|
|
|
|
def img = docker.build('rokoch/ium:01')
|
|
|
|
img.inside {
|
|
|
|
sh 'chmod +x create_dataset.py'
|
2021-05-07 23:03:14 +02:00
|
|
|
sh 'python3 ./create_dataset.py $CUTOFF'
|
2021-05-07 20:16:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('end') {
|
|
|
|
steps {
|
|
|
|
//Zarchiwizuj wynik
|
|
|
|
archiveArtifacts 'train_dataset.pt,val_dataset.pt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-05-07 23:18:04 +02:00
|
|
|
post {
|
|
|
|
success {
|
|
|
|
//Uruchamianie innego zadania
|
2021-05-16 08:49:10 +02:00
|
|
|
//build job: 's426206-training/master', parameters: [string(name: 'PARAMETRY', value: ''), string(name: 'BUILD_SELECTOR', value: '<StatusBuildSelector plugin="copyartifact@1.46"/>')]
|
2021-05-07 23:18:04 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2021-05-07 20:16:31 +02:00
|
|
|
}
|