ium_464953/Jenkinsfile_sacred
Michal Gulczynski 19460ed294 ium_07 sacred
2024-06-11 19:24:36 +02:00

51 lines
1.2 KiB
Plaintext

pipeline {
agent any
parameters {
string(name: 'KAGGLE_USERNAME', defaultValue: 'gulczas', description: 'Kaggle username')
password(name: 'KAGGLE_KEY', defaultValue: '', description: 'Kaggle API key')
}
stages {
stage('Clone Repository') {
steps {
git 'https://git.wmi.amu.edu.pl/s464953/ium_464953.git'
}
}
stage('Download datasets') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh "bash ./download_dataset.sh"
}
}
}
stage('Build and Run Experiments') {
agent {
dockerfile {
reuseNode true
}
}
environment {
KAGGLE_USERNAME = "${params.KAGGLE_USERNAME}"
KAGGLE_KEY = "${params.KAGGLE_KEY}"
}
steps {
sh 'chmod +x sacred/sacred_model_creator.py'
sh 'python3 sacred/sacred_model_creator.py'
sh 'chmod +x sacred/sacred_use_model.py'
sh 'python3 sacred/sacred_use_model.py'
}
}
stage('Archive Artifacts from Experiments') {
steps {
archiveArtifacts artifacts: 'my_experiment_logs/**', allowEmptyArchive: true
}
}
}
}