ium_452662/Jenkinsfile

41 lines
1.5 KiB
Plaintext
Raw Normal View History

2023-03-23 11:13:21 +01:00
node {
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'
)
])
])
}
stage('Build') {
// Run the maven build
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
}
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 11:58:40 +01:00
sh '''kaggle datasets download -d aleksandrglotov/car-prices-poland
unzip -o car-prices-poland.zip
wc -l Car_Prices_Poland_Kaggle.csv
head -n 11793 Car_Prices_Poland_Kaggle.csv > cars_test.csv
head -n 23586 Car_Prices_Poland_Kaggle.csv | tail -11793 > cars_dev.csv
tail -n 1037740 Car_Prices_Poland_Kaggle.csv > cars_train.csv'''
2023-03-23 11:13:21 +01:00
}
2023-03-23 11:47:07 +01:00
stage('Save data into artifacts') {
archiveArtifacts artifacts: '*.csv', followSymlinks: false
2023-03-23 11:13:21 +01:00
}
}