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 {
2024-04-03 09:29:51 +02:00
stage('Test') {
steps {
sh 'pip3 list'
}
}
2024-03-20 14:34:10 +01:00
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 {
2024-04-03 09:20:19 +02:00
sh 'pip list'
2024-04-03 09:23:44 +02:00
sh 'pip3 list'
sh 'pip3 --version'
sh 'python3 --version'
2024-04-03 09:07:35 +02:00
script {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
2024-04-03 09:20:19 +02:00
sh 'pip list'
2024-04-03 09:23:44 +02:00
sh 'pip3 list'
sh 'pip3 --version'
sh 'python3 --version'
2024-04-03 09:07:35 +02:00
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
2024-04-10 09:09:46 +02:00
sh 'ls -al /.kaggle'
2024-04-03 09:07:35 +02:00
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
}