ium-s301654/create-dataset.Jenkinsfile
Paweł Skórzewski 669d6ccf93 Debug
2024-04-03 09:20:19 +02:00

58 lines
1.6 KiB
Plaintext

pipeline {
agent {
dockerfile true
}
parameters {
string (
defaultValue: '100',
description: 'Wielkość odcięcia zbioru danych',
name: 'CUTOFF',
trim: false
)
string (
defaultValue: 'skorzewski',
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'
)
}
stages {
stage('Checkout') {
steps {
checkout scmGit(
branches: [[name: '*/main']],
extensions: [],
userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/pms/ium-s301654']])
}
}
stage('Kaggle') {
steps {
sh 'pip list'
script {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'pip list'
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
}
}
}
stage('Download') {
steps {
sh "CUTOFF=${CUTOFF} ./create-dataset.sh"
}
}
stage('Archive') {
steps {
archiveArtifacts artifacts: 'data.csv', followSymlinks: false
}
}
}
}