ium_z486867/Jenkinsfile_create_dataset

67 lines
1.8 KiB
Plaintext
Raw Normal View History

2023-03-25 13:53:02 +01:00
pipeline {
2023-04-20 19:48:17 +02:00
agent any
2023-03-25 13:53:02 +01:00
2023-04-20 19:48:17 +02:00
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
parameters{
string(
defaultValue: 'mikaleta',
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'
)
string(
defaultValue: '500',
description: 'CUTOFF',
name: 'CUTOFF',
trim: false
)
}
2023-03-25 13:53:02 +01:00
stages {
2023-04-20 19:48:17 +02:00
stage('clear_before') {
steps {
sh 'rm -rf *'
}
}
2023-03-25 13:53:02 +01:00
2023-04-20 19:48:17 +02:00
stage('Clone Git') {
steps {
sh 'git clone https://git.wmi.amu.edu.pl/s486867/ium_z486867'
}
}
stage('Build') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'kaggle datasets download -d dansbecker/powerlifting-database'
2023-04-20 19:56:18 +02:00
sh 'unzip powerlifting-database.zip -d ./ium_z486867'
2023-04-20 19:48:17 +02:00
}
}
}
stage('Docker') {
agent {
dockerfile {
filename 'Dockerfile'
dir 'ium_z486867'
reuseNode true
2023-03-25 13:53:02 +01:00
}
2023-04-20 19:48:17 +02:00
}
steps {
sh 'python ./ium_z486867/create-dataset.py'
archiveArtifacts 'X_test.csv'
archiveArtifacts 'X_dev.csv'
archiveArtifacts 'X_train.csv'
}
}
stage('clear_after') {
steps {
sh 'rm -rf *'
}
}
}
}