2024-05-14 16:21:16 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
2024-05-20 16:38:06 +02:00
|
|
|
docker { image 'paweldopierala/ium:2.0.0' }
|
2024-05-14 16:21:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
parameters{
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
2024-05-15 00:01:22 +02:00
|
|
|
description: 'Which build to use for copying artifacts (create-dataset, evaluation)',
|
|
|
|
name: 'BUILD_SELECTOR_MAIN'
|
|
|
|
)
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts (training)',
|
|
|
|
name: 'BUILD_SELECTOR_TRAINING'
|
2024-05-14 16:21:16 +02:00
|
|
|
)
|
2024-05-14 23:22:00 +02:00
|
|
|
gitParameter(
|
|
|
|
branchFilter: '.*',
|
|
|
|
defaultValue: 'main',
|
|
|
|
name: 'TRAINING_BRANCH',
|
|
|
|
type: 'PT_BRANCH',
|
|
|
|
description: 'Branch for training project'
|
|
|
|
)
|
2024-05-14 16:21:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
triggers {
|
2024-05-14 23:38:19 +02:00
|
|
|
upstream(upstreamProjects: 's495719-training/' + params.TRAINING_BRANCH, threshold: hudson.model.Result.SUCCESS)
|
2024-05-14 16:21:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Git') {
|
|
|
|
steps {
|
|
|
|
git(
|
|
|
|
url: "https://git.wmi.amu.edu.pl/s495719/ium_495719.git",
|
|
|
|
branch: "main"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('CopyArtifacts') {
|
|
|
|
steps {
|
2024-05-15 00:12:05 +02:00
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s495719-create-dataset', selector: buildParameter('BUILD_SELECTOR_MAIN')
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's495719-training/' + params.TRAINING_BRANCH, selector: buildParameter('BUILD_SELECTOR_MAIN')
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's495719-evaluation/main', selector: buildParameter('BUILD_SELECTOR_TRAINING'), optional: true
|
2024-05-14 16:21:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Script') {
|
|
|
|
steps {
|
|
|
|
sh 'chmod 777 ./evaluate.py'
|
|
|
|
sh "python3 ./evaluate.py ${currentBuild.number}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('CreateArtifacts') {
|
|
|
|
steps {
|
2024-05-15 01:43:14 +02:00
|
|
|
archiveArtifacts artifacts: 'hp_test_predictions.csv,hp_test_metrics.csv,plot_mae.png, plot_r2.png, plot_rmse.png'
|
2024-05-14 16:21:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|