76 lines
2.2 KiB
Plaintext
76 lines
2.2 KiB
Plaintext
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: 'a7a48b574c0f2bf5a10da7be4e70d053',
|
|
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('clear') {
|
|
steps {
|
|
sh 'rm -rf *'
|
|
}
|
|
}
|
|
|
|
stage('Clone Git') {
|
|
steps {
|
|
sh 'git clone https://git.wmi.amu.edu.pl/s434743/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_z434743'
|
|
reuseNode true
|
|
}
|
|
}
|
|
steps {
|
|
sh 'python ./ium_z434743/z434743-create-dataset.py'
|
|
archiveArtifacts 'X_test.csv'
|
|
archiveArtifacts 'X_dev.csv'
|
|
archiveArtifacts 'X_train.csv'
|
|
archiveArtifacts 'Y_test.csv'
|
|
archiveArtifacts 'Y_dev.csv'
|
|
archiveArtifacts 'Y_train.csv'
|
|
}
|
|
}
|
|
stage('clear2') {
|
|
steps {
|
|
sh 'rm -rf *'
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
build 'z-s434743-training/master'
|
|
}
|
|
}
|
|
} |