2021-04-10 20:44:27 +02:00
|
|
|
pipeline {
|
2021-04-10 21:08:27 +02:00
|
|
|
agent any
|
|
|
|
parameters {
|
|
|
|
string(
|
|
|
|
defaultValue: '0',
|
|
|
|
description: 'Umożliwia zdefiniowanie wielkości odcięcia zbioru danych.',
|
|
|
|
name: 'CUTOFF',
|
|
|
|
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')
|
2021-04-10 21:27:21 +02:00
|
|
|
img.inside {
|
2021-04-10 21:13:26 +02:00
|
|
|
sh 'chmod +x skrypt.sh'
|
2021-04-10 23:34:12 +02:00
|
|
|
sh './skrypt.sh $CUTOFF'
|
2021-04-10 21:11:13 +02:00
|
|
|
}
|
2021-04-10 21:08:27 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-04-10 23:03:36 +02:00
|
|
|
|
|
|
|
stage('end') {
|
|
|
|
steps {
|
|
|
|
//Zarchiwizuj wynik
|
|
|
|
archiveArtifacts 'output.txt,Global_Superstore22.csv,Global_Superstore2.csv.dev,Global_Superstore2.csv.test,Global_Superstore2.csv.train'
|
|
|
|
}
|
|
|
|
}
|
2021-04-10 21:08:27 +02:00
|
|
|
}
|
|
|
|
}
|