ium_464863/Jenkinsfile
Paweł Łączkowski 5b6eadb3ce IUM_06 - test
2024-04-19 11:11:24 +02:00

57 lines
1.5 KiB
Groovy

pipeline {
agent any
parameters {
password (
name: 'KAGGLE_USERNAME',
defaultValue: '',
description: 'Kaggle username'
)
password (
name: 'KAGGLE_KEY',
defaultValue: '',
description: 'Kaggle API key'
)
string (
name: 'CUTOFF',
defaultValue: '500',
description: 'Get only the first CUTOFF rows of the dataset'
)
}
stages {
stage('Clone repository') {
steps {
checkout scm
}
}
stage('Download dataset') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh "kaggle datasets download -d uciml/breast-cancer-wisconsin-data"
sh "unzip -o breast-cancer-wisconsin-data.zip"
sh "mkdir -p datasets"
sh "mv data.csv datasets/data.csv"
}
}
}
stage('Preprocess data') {
agent {
dockerfile {
filename 'Dockerfile'
reuseNode true
}
}
steps {
sh "chmod +x ./download_dataset.py"
sh "python3 ./download_dataset.py ${params.CUTOFF}"
archiveArtifacts artifacts: 'datasets/*', onlyIfSuccessful: true
build job: 's464863-training/main', wait: false
}
}
}
}