ium_z434686/Jenkinsfile_create_dataset

64 lines
2.0 KiB
Plaintext

pipeline {
agent any
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
parameters{
string(
defaultValue: 'patrykgaka',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
password(
defaultValue: 'd14370cec1714b0cd1ef2875038b5950',
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
)
}
stages {
stage('clear_all') {
steps {
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
sh 'rm -rf *'
}
}
stage('Build') {
steps {
sh 'git clone https://git.wmi.amu.edu.pl/s434686/ium_z434686'
// Run the maven build
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'kaggle datasets download -d rush4ratio/video-game-sales-with-ratings'
sh 'unzip video-game-sales-with-ratings.zip -d ./ium_z434686'
//unzip zipFile: 'video-game-sales-with-ratings.zip', dir: './ium_z434686'
sh 'rm video-game-sales-with-ratings.zip'
sh 'ls -a'
sh 'ls -a ./ium_z434686'
}
}
}
stage('Docker') {
agent {
dockerfile {
filename 'create.dockerfile'
}
}
steps {
sh 'ls -a'
sh 'python create-dataset.py'
archiveArtifacts 'X_train.csv'
archiveArtifacts 'X_dev.csv'
archiveArtifacts 'X_tes.csv'
}
}
}
}