2023-04-18 14:40:42 +02:00
|
|
|
pipeline {
|
2023-04-19 10:51:42 +02:00
|
|
|
agent any
|
2023-04-18 22:16:24 +02:00
|
|
|
|
2023-03-25 13:40:54 +01:00
|
|
|
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
2023-04-18 15:53:49 +02:00
|
|
|
parameters{
|
2023-04-18 15:13:26 +02:00
|
|
|
string(
|
2023-04-19 19:04:56 +02:00
|
|
|
defaultValue: 'patrykgaka',
|
2023-04-18 15:13:26 +02:00
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
2023-04-18 16:11:12 +02:00
|
|
|
)
|
2023-04-18 15:13:26 +02:00
|
|
|
password(
|
2023-05-10 21:32:28 +02:00
|
|
|
defaultValue: 'd14370cec1714b0cd1ef2875038b5950',
|
2023-04-18 15:13:26 +02:00
|
|
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
|
|
|
name: 'KAGGLE_KEY'
|
|
|
|
)
|
2023-04-18 20:21:20 +02:00
|
|
|
string(
|
2023-04-19 15:45:11 +02:00
|
|
|
defaultValue: '500',
|
2023-04-18 20:21:20 +02:00
|
|
|
description: 'CUTOFF',
|
|
|
|
name: 'CUTOFF',
|
|
|
|
trim: false
|
|
|
|
)
|
2023-04-18 15:53:49 +02:00
|
|
|
}
|
2023-04-18 15:35:14 +02:00
|
|
|
stages {
|
2023-04-19 17:59:10 +02:00
|
|
|
stage('clear_before') {
|
2023-03-25 13:40:54 +01:00
|
|
|
steps {
|
2023-04-19 15:51:19 +02:00
|
|
|
sh 'rm -rf *'
|
2023-03-25 13:40:54 +01:00
|
|
|
}
|
|
|
|
}
|
2023-04-19 16:07:25 +02:00
|
|
|
|
2023-04-19 17:59:10 +02:00
|
|
|
stage('Clone Git') {
|
|
|
|
steps {
|
|
|
|
sh 'git clone https://git.wmi.amu.edu.pl/s434686/ium_z434686'
|
|
|
|
}
|
|
|
|
}
|
2023-04-18 19:46:24 +02:00
|
|
|
|
2023-04-18 19:28:43 +02:00
|
|
|
stage('Build') {
|
2023-04-18 19:30:22 +02:00
|
|
|
steps {
|
2023-04-18 19:28:43 +02:00
|
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
|
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
2023-04-18 19:37:39 +02:00
|
|
|
sh 'kaggle datasets download -d rush4ratio/video-game-sales-with-ratings'
|
2023-04-19 16:07:25 +02:00
|
|
|
sh 'unzip video-game-sales-with-ratings.zip -d ./ium_z434686'
|
2023-04-19 17:59:10 +02:00
|
|
|
}
|
2023-04-18 19:30:22 +02:00
|
|
|
}
|
2023-04-18 19:28:43 +02:00
|
|
|
}
|
2023-04-19 10:51:42 +02:00
|
|
|
stage('Docker') {
|
2023-04-19 17:59:10 +02:00
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
filename 'Dockerfile'
|
|
|
|
dir 'ium_z434686'
|
|
|
|
reuseNode true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'python ./ium_z434686/create-dataset.py'
|
2023-05-10 20:20:51 +02:00
|
|
|
sh 'python ./ium_z434686/train.py'
|
2023-05-10 20:24:41 +02:00
|
|
|
sh 'python ./ium_z434686/predict.py'
|
2023-04-19 17:59:10 +02:00
|
|
|
archiveArtifacts 'X_test.csv'
|
|
|
|
archiveArtifacts 'X_dev.csv'
|
|
|
|
archiveArtifacts 'X_train.csv'
|
2023-05-10 19:19:27 +02:00
|
|
|
archiveArtifacts 'Y_test.csv'
|
|
|
|
archiveArtifacts 'Y_dev.csv'
|
|
|
|
archiveArtifacts 'Y_train.csv'
|
2023-05-10 20:49:31 +02:00
|
|
|
archiveArtifacts 'prediction.csv'
|
2023-04-19 17:59:10 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('clear_after') {
|
|
|
|
steps {
|
|
|
|
sh 'rm -rf *'
|
2023-04-18 19:46:24 +02:00
|
|
|
}
|
|
|
|
}
|
2023-05-10 21:46:21 +02:00
|
|
|
post {
|
|
|
|
always {
|
2023-05-10 21:48:18 +02:00
|
|
|
build 'z-s434686-training'
|
2023-05-10 21:46:21 +02:00
|
|
|
}
|
2023-03-25 13:40:54 +01:00
|
|
|
}
|
|
|
|
}
|