ium_z434743/Jenkinsfile

62 lines
1.8 KiB
Groovy

pipeline {
agent any
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
parameters{
string(
defaultValue: 'patluk',
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: '200',
description: 'CUTOFF',
name: 'CUTOFF',
trim: false
)
}
stages {
stage('Clone Git') {
steps {
sh 'git clone https://git.wmi.amu.edu.pl/s43743/ium_z434743'
}
}
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
}
}
steps {
sh 'python ./ium_z434743/z434743-create-dataset.py'
archiveArtifacts 'X_test.csv'
archiveArtifacts 'X_dev.csv'
archiveArtifacts 'X_train.csv'
}
}
stage('clear') {
steps {
sh 'rm -rf *'
}
}
}
}