ium_z444510/Jenkinsfile-create-dataset-docker

55 lines
1.6 KiB
Plaintext
Raw Permalink Normal View History

2023-05-11 22:05:21 +02:00
pipeline {
2023-05-11 23:12:16 +02:00
agent any
2023-05-11 22:05:21 +02:00
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 {
2023-05-11 22:15:57 +02:00
stage('clear') {
steps {
sh 'rm -rf *'
}
}
2023-05-11 22:05:21 +02:00
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'
2023-05-11 23:02:41 +02:00
sh 'unzip airbnb-prices-in-european-cities.zip'
2023-05-11 22:17:45 +02:00
sh 'ls'
2023-05-11 22:05:21 +02:00
}
}
}
2023-05-11 23:12:16 +02:00
stage('Docker') {
agent {
2023-05-11 23:25:26 +02:00
dockerfile {
filename 'Dockerfile'
reuseNode true
}
2023-05-11 23:12:16 +02:00
}
steps {
2023-05-11 23:30:37 +02:00
sh 'python3 create-dataset.py'
archiveArtifacts artifacts: 'barcelona_weekends.train.csv, barcelona_weekends.dev.csv, barcelona_weekends.test.csv', fingerprint: true
2023-05-11 23:12:16 +02:00
}
}
2023-05-11 22:05:21 +02:00
}
}