ium-s301654/create-dataset.Jenkinsfile
Paweł Skórzewski d9e85025e2 Attempt 4
2024-04-10 09:47:11 +02:00

56 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/blob/main/docs/README.md#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 {
script {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
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
}
}
}
}