2024-03-20 14:29:28 +01:00
pipeline {
2024-03-26 12:15:35 +01:00
agent {
dockerfile true
}
2024-03-20 14:52:24 +01:00
parameters {
string (
defaultValue: '100',
description: 'Wielkość odcięcia zbioru danych',
name: 'CUTOFF',
trim: false
)
2024-04-03 09:06:06 +02:00
string (
defaultValue: 'skorzewski',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
password (
defaultValue: '',
2024-04-03 09:29:51 +02:00
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api/blob/main/docs/README.md#api-credentials',
2024-04-03 09:06:06 +02:00
name: 'KAGGLE_KEY'
)
2024-03-20 14:52:24 +01:00
}
2024-03-20 14:34:10 +01:00
stages {
stage('Checkout') {
steps {
checkout scmGit(
branches: [[name: '*/main']],
extensions: [],
userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/pms/ium-s301654']])
}
}
2024-04-03 09:06:06 +02:00
stage('Kaggle') {
2024-04-03 09:07:35 +02:00
steps {
script {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
2024-04-03 09:06:06 +02:00
}
}
}
2024-03-20 14:45:30 +01:00
stage('Download') {
steps {
2024-03-20 14:52:24 +01:00
sh "CUTOFF=${CUTOFF} ./create-dataset.sh"
2024-03-20 14:45:30 +01:00
}
}
2024-03-20 14:46:59 +01:00
stage('Archive') {
steps {
2024-03-20 14:52:59 +01:00
archiveArtifacts artifacts: 'data.csv', followSymlinks: false
2024-03-20 14:46:59 +01:00
}
}
2024-03-20 14:34:10 +01:00
}
2024-03-20 14:29:28 +01:00
}