2024-03-23 20:49:49 +01:00
|
|
|
pipeline {
|
2024-05-09 01:56:58 +02:00
|
|
|
agent {
|
|
|
|
dockerfile true
|
|
|
|
}
|
|
|
|
|
|
|
|
triggers {
|
|
|
|
upstream(upstreamProjects: 's464953-training/training', threshold: hudson.model.Result.SUCCESS)
|
|
|
|
}
|
2024-03-23 20:49:49 +01:00
|
|
|
|
|
|
|
parameters {
|
2024-05-09 01:56:58 +02:00
|
|
|
buildSelector(defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR')
|
|
|
|
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'training', name: 'BRANCH', type: 'PT_BRANCH'
|
|
|
|
}
|
2024-03-23 20:49:49 +01:00
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Clone Repository') {
|
|
|
|
steps {
|
|
|
|
git 'https://git.wmi.amu.edu.pl/s464953/ium_464953.git'
|
|
|
|
}
|
|
|
|
}
|
2024-05-09 01:56:58 +02:00
|
|
|
stage('Copy Training Artifacts') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts filter: 'artifacts/*', projectName: 's464953-training/' + params.BRANCH, selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Copy Evaluation Artifacts') {
|
|
|
|
steps {
|
2024-05-09 02:15:19 +02:00
|
|
|
copyArtifacts filter: 'metrics_df.csv', projectName: 's464953-evaluation/evaluation', selector: buildParameter('BUILD_SELECTOR'), optional: true
|
2024-05-09 01:56:58 +02:00
|
|
|
}
|
2024-03-25 21:17:08 +01:00
|
|
|
}
|
2024-05-09 01:56:58 +02:00
|
|
|
|
2024-03-23 20:49:49 +01:00
|
|
|
stage('Run Script') {
|
|
|
|
steps {
|
2024-05-09 01:56:58 +02:00
|
|
|
sh "python3 /app/use_model.py ${currentBuild.number}"
|
2024-03-23 20:49:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Archive Artifacts') {
|
|
|
|
steps {
|
2024-05-09 01:56:58 +02:00
|
|
|
archiveArtifacts artifacts: '*', onlyIfSuccessful: true
|
2024-03-23 20:49:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|