ium_z444510/Jenkinsfile-create-dataset-docker
piotrwrzodak cc25dfd3b2 4.3.1 v7
2023-05-11 22:50:09 +02:00

56 lines
1.6 KiB
Plaintext

pipeline {
agent any
parameters{
string(
defaultValue: 'piotrwrzodak',
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: '100',
description: 'CUTOFF',
name: 'CUTOFF',
trim: false
)
}
stages {
stage('clear') {
steps {
sh 'rm -rf *'
}
}
stage('checkout: Check out from version control') {
steps {
checkout scm
}
}
stage('Build') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'kaggle datasets download -d thedevastator/airbnb-prices-in-european-cities'
sh 'unzip airbnb-prices-in-european-cities.zip -d data'
sh 'ls'
}
}
}
stage('Docker') {
agent {
dockerfile true
}
steps {
sh 'python3 create-dataset.py'
}
}
stage('Archive') {
steps {
archiveArtifacts artifacts: 'data/barcelona_weekends.train.csv, data/barcelona_weekends.dev.csv, data/barcelona_weekends.test.csv', fingerprint: true
}
}
}
}