ium_z434743/Jenkinsfile-create-dataset

62 lines
1.8 KiB
Plaintext
Raw Normal View History

2023-04-18 14:54:06 +02:00
pipeline {
2023-04-20 14:21:59 +02:00
agent any
2023-04-18 14:54:06 +02:00
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
2023-04-18 16:24:03 +02:00
parameters{
2023-04-18 15:37:40 +02:00
string(
defaultValue: 'patluk',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
2023-04-18 16:24:03 +02:00
)
2023-04-18 15:37:40 +02:00
password(
2023-04-20 14:21:59 +02:00
defaultValue: '',
2023-04-18 15:37:40 +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-20 14:21:59 +02:00
string(
defaultValue: '200',
description: 'CUTOFF',
name: 'CUTOFF',
trim: false
)
2023-04-18 16:24:03 +02:00
}
2023-04-18 16:35:25 +02:00
stages {
2023-04-20 14:21:59 +02:00
stage('Clone Git') {
steps {
sh 'git clone https://git.wmi.amu.edu.pl/s434743/ium_z434743'
2023-04-20 14:21:59 +02:00
}
}
stage('Build') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'kaggle datasets download -d andrezaza/clapper-massive-rotten-tomatoes-movies-and-reviews'
sh 'unzip clapper-massive-rotten-tomatoes-movies-and-reviews.zip -d ./ium_z434743'
}
}
}
stage('Docker') {
agent {
dockerfile {
filename 'Dockerfile'
dir 'ium_z43743'
reuseNode true
}
}
2023-04-18 14:54:06 +02:00
steps {
2023-04-20 14:21:59 +02:00
sh 'python ./ium_z434743/z434743-create-dataset.py'
archiveArtifacts 'X_test.csv'
archiveArtifacts 'X_dev.csv'
archiveArtifacts 'X_train.csv'
2023-04-18 14:54:06 +02:00
}
}
2023-04-20 14:21:59 +02:00
stage('clear') {
2023-04-18 14:54:06 +02:00
steps {
2023-04-20 14:21:59 +02:00
sh 'rm -rf *'
2023-04-18 14:54:06 +02:00
}
}
}
}