ium_452662/Jenkinsfile

44 lines
1.6 KiB
Plaintext
Raw Normal View History

2023-03-23 11:13:21 +01:00
node {
2023-04-04 13:51:36 +02:00
checkout scm
def testImage = docker.build("test-image")
testImage.inside {
stage('Preparation') {
properties([
parameters([
string(
defaultValue: 'michal2608',
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'
2023-03-23 12:28:29 +01:00
),
string(
defaultValue: '117926',
description: 'Number of positions to be saved',
name: 'CUTOFF',
trim: false)
])
])
}
2023-03-23 11:47:07 +01:00
stage('Download data') {
checkout scmGit(branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s452662/ium_452662']])
2023-03-23 11:13:21 +01:00
}
2023-03-23 11:47:07 +01:00
stage('Cut data') {
2023-03-23 12:28:29 +01:00
withEnv(["CUTOFF=${params.CUTOFF}"]) {
2023-04-04 21:58:34 +02:00
sh '''git clone https://git.wmi.amu.edu.pl/s452662/zbior_ium.git
cd zbior_ium
2023-03-23 11:58:40 +01:00
wc -l Car_Prices_Poland_Kaggle.csv
2023-03-23 12:37:15 +01:00
head -n 11793 Car_Prices_Poland_Kaggle.csv > cars_test.csv
head -n 23586 Car_Prices_Poland_Kaggle.csv | tail -11793 > cars_dev.csv
head -n $((CUTOFF)) Car_Prices_Poland_Kaggle.csv | tail $((23586 - CUTOFF)) > cars_train.csv'''}
2023-03-23 11:13:21 +01:00
}
2023-03-23 11:47:07 +01:00
stage('Save data into artifacts') {
2023-05-05 17:13:16 +02:00
archiveArtifacts artifacts: 'zbior_ium/*.csv', followSymlinks: false
2023-03-23 11:13:21 +01:00
}
2023-04-04 13:51:36 +02:00
}
2023-03-23 11:13:21 +01:00
}