2023-03-25 13:39:50 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
|
|
|
parameters {
|
2023-04-21 09:37:13 +02:00
|
|
|
string(
|
|
|
|
defaultValue: '1000',
|
|
|
|
description: 'Amount of values to be used from dataset',
|
|
|
|
name: 'CUTOFF',
|
2023-03-25 13:39:50 +01:00
|
|
|
trim: false
|
2023-04-20 22:41:54 +02:00
|
|
|
)
|
|
|
|
string(
|
|
|
|
defaultValue: 'wleczny',
|
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
|
|
|
)
|
|
|
|
password(
|
|
|
|
defaultValue: '2e89e20ceb0a48d9df01a01bad744776',
|
|
|
|
description: 'Kaggle token',
|
|
|
|
name: 'KAGGLE_KEY'
|
|
|
|
)
|
2023-03-25 13:39:50 +01:00
|
|
|
}
|
|
|
|
stages {
|
2023-04-21 12:16:27 +02:00
|
|
|
stage('Checkout') {
|
|
|
|
steps {
|
|
|
|
sh 'rm -rf ium_z487183'
|
|
|
|
sh 'git clone https://git.wmi.amu.edu.pl/s487183/ium_z487183.git'
|
|
|
|
}
|
|
|
|
}
|
2023-04-20 22:41:54 +02:00
|
|
|
stage('Prepare data') {
|
2023-03-25 13:39:50 +01:00
|
|
|
steps {
|
2023-04-20 22:41:54 +02:00
|
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
2023-04-21 12:16:27 +02:00
|
|
|
sh 'ium_z487183/get-data.sh'
|
|
|
|
sh 'python3 ium_z487183/prepare_dataset.py'
|
2023-04-20 22:41:54 +02:00
|
|
|
}
|
2023-03-25 13:39:50 +01:00
|
|
|
}
|
|
|
|
}
|
2023-04-20 22:41:54 +02:00
|
|
|
stage('Archive artifacts') {
|
2023-04-21 12:16:27 +02:00
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
filename 'CreateDataset.dockerfile'
|
|
|
|
dir 'ium_z487183'
|
|
|
|
reuseNode true
|
|
|
|
}
|
|
|
|
}
|
2023-03-25 13:39:50 +01:00
|
|
|
steps {
|
2023-04-21 12:16:27 +02:00
|
|
|
withEnv(["CUTOFF=${params.CUTOFF}"]) {
|
|
|
|
archiveArtifacts 'X_test.csv'
|
|
|
|
archiveArtifacts 'X_val.csv'
|
|
|
|
archiveArtifacts 'X_train.csv'
|
|
|
|
archiveArtifacts 'Y_test.csv'
|
|
|
|
archiveArtifacts 'Y_val.csv'
|
|
|
|
archiveArtifacts 'Y_train.csv'
|
|
|
|
}
|
2023-03-25 13:39:50 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|