ium_464913/Jenkinsfile
2024-04-01 17:38:17 +02:00

44 lines
930 B
Groovy

pipeline {
agent {
dockerfile {
filename 'Dockerfile'
args '-u root'
}
}
parameters {
string (
defaultValue: 'vskyper',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
password (
defaultValue: '',
description: 'Kaggle API key',
name: 'KAGGLE_KEY',
)
}
environment {
KAGGLE_USERNAME = "${params.KAGGLE_USERNAME}"
KAGGLE_KEY = "${params.KAGGLE_KEY}"
}
stages {
stage('Run create-dataset script') {
steps {
sh 'kaggle datasets download -d mlg-ulb/creditcardfraud'
sh 'unzip creditcardfraud.zip'
sh 'rm creditcardfraud.zip'
sh 'chmod +x create-dataset.py'
sh 'python3 ./create-dataset.py $KAGGLE_USERNAME'
}
}
stage('Archive Artifacts') {
steps {
archiveArtifacts artifacts: 'data/*', onlyIfSuccessful: true
}
}
}
}