ium-s301654/create-dataset.Jenkinsfile
Paweł Skórzewski f176ed32f1 Debug 4
2024-04-03 09:29:51 +02:00

69 lines
2.0 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('Test') {
steps {
sh 'pip3 list'
}
}
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'
sh 'pip3 list'
sh 'pip3 --version'
sh 'python3 --version'
script {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'pip list'
sh 'pip3 list'
sh 'pip3 --version'
sh 'python3 --version'
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
}
}
}
}