2022-03-27 17:28:34 +02:00
|
|
|
node {
|
2022-05-02 16:26:14 +02:00
|
|
|
checkout scm
|
2022-05-02 16:39:49 +02:00
|
|
|
def dockerImageIUM = docker.build("s444452/ium:1.3")
|
2022-05-02 16:21:45 +02:00
|
|
|
dockerImageIUM.inside {
|
2022-04-03 23:22:54 +02:00
|
|
|
stage('Preparation') {
|
|
|
|
properties([
|
|
|
|
parameters([
|
|
|
|
string(
|
2022-03-27 17:28:34 +02:00
|
|
|
defaultValue: 'adamosiowy',
|
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
2022-04-03 23:22:54 +02:00
|
|
|
),
|
|
|
|
password(
|
2022-03-27 17:28:34 +02:00
|
|
|
defaultValue: '',
|
|
|
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
|
|
|
name: 'KAGGLE_KEY'
|
2022-04-03 23:22:54 +02:00
|
|
|
),
|
|
|
|
string(
|
|
|
|
defaultValue: "10000",
|
|
|
|
description: 'Determine the size of dataset',
|
|
|
|
name: 'CUTOFF'
|
|
|
|
)
|
|
|
|
])
|
|
|
|
])
|
|
|
|
}
|
|
|
|
stage('Clone repository') {
|
|
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: '5e0a58a0-03ad-41dd-beff-7b8a07c7fe0c', url: 'https://git.wmi.amu.edu.pl/s444452/ium_444452.git']]])
|
|
|
|
}
|
|
|
|
stage('Run script') {
|
|
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
|
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}","CUTOFF=${params.CUTOFF}"]) {
|
2022-05-02 16:21:45 +02:00
|
|
|
sh "python3 Scripts/download_dataset.py '.' 'dataset.csv'"
|
|
|
|
sh "python3 Scripts/train_neural_network.py '.'"
|
2022-04-03 23:22:54 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Archive artifacts') {
|
2022-04-24 22:51:20 +02:00
|
|
|
archiveArtifacts "dataset.csv, train_data.csv, test_data.csv, dev_data.csv, neural_network_evaluation.txt"
|
2022-03-21 10:59:06 +01:00
|
|
|
}
|
|
|
|
}
|
2022-04-03 23:22:54 +02:00
|
|
|
}
|