ium_464953/Jenkinsfile_sacred

51 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2024-06-11 19:06:13 +02:00
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'
}
}
2024-06-11 19:24:36 +02:00
stage('Download datasets') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh "bash ./download_dataset.sh"
}
}
}
2024-06-11 19:06:13 +02:00
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
}
}
}
}