Dockerfile

This commit is contained in:
Mateusz 2024-04-01 17:46:47 +02:00
parent cd23bed57e
commit 7cc806ba75
1 changed files with 17 additions and 10 deletions

27
Jenkinsfile vendored
View File

@ -1,10 +1,5 @@
pipeline {
agent {
dockerfile {
filename 'Dockerfile'
args '-u root'
}
}
agent any
parameters {
string (
@ -21,17 +16,29 @@ pipeline {
}
stages {
stage('Run create-dataset script') {
stage('Download dataset') {
steps {
withEnv (["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
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('Run create-dataset script') {
agent {
dockerfile {
reuseNode true
}
}
steps {
sh 'chmod +x create-dataset.py'
sh 'python3 ./create-dataset.py $KAGGLE_USERNAME'
}
}
stage('Archive Artifacts') {
steps {
archiveArtifacts artifacts: 'data/*', onlyIfSuccessful: true