2024-04-01 16:14:55 +02:00
|
|
|
pipeline {
|
2024-04-01 18:04:49 +02:00
|
|
|
agent any
|
2024-03-24 11:31:18 +01:00
|
|
|
|
|
|
|
parameters {
|
|
|
|
string (
|
|
|
|
defaultValue: 'vskyper',
|
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
|
|
|
)
|
|
|
|
password (
|
|
|
|
defaultValue: '',
|
2024-04-01 17:02:18 +02:00
|
|
|
description: 'Kaggle API key',
|
2024-03-24 11:31:18 +01:00
|
|
|
name: 'KAGGLE_KEY',
|
|
|
|
)
|
|
|
|
}
|
2024-03-24 12:13:05 +01:00
|
|
|
|
2024-04-01 18:03:42 +02:00
|
|
|
stages {
|
2024-04-01 18:04:49 +02:00
|
|
|
stage('Clone Repository') {
|
|
|
|
steps {
|
|
|
|
git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s464913/ium_464913.git'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Download dataset') {
|
|
|
|
steps {
|
|
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
2024-04-01 19:14:34 +02:00
|
|
|
sh 'pip install kaggle'
|
2024-04-01 18:04:49 +02:00
|
|
|
sh 'kaggle datasets download -d mlg-ulb/creditcardfraud'
|
|
|
|
sh 'unzip -o creditcardfraud.zip'
|
|
|
|
sh 'rm creditcardfraud.zip'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-01 17:46:47 +02:00
|
|
|
stage('Run create-dataset script') {
|
2024-04-01 18:04:49 +02:00
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
reuseNode true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-01 17:46:47 +02:00
|
|
|
steps {
|
2024-04-01 17:58:31 +02:00
|
|
|
sh 'chmod +x create-dataset.py'
|
2024-04-01 18:04:49 +02:00
|
|
|
sh 'python3 ./create-dataset.py'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Archive Artifacts') {
|
|
|
|
steps {
|
|
|
|
archiveArtifacts artifacts: 'data/*', onlyIfSuccessful: true
|
2024-03-24 11:31:18 +01:00
|
|
|
}
|
2024-03-20 14:24:07 +01:00
|
|
|
}
|
2024-03-24 11:31:18 +01:00
|
|
|
}
|
2024-03-20 14:21:31 +01:00
|
|
|
}
|