2021-05-13 00:15:26 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
2021-05-16 09:37:12 +02:00
|
|
|
// triggers {
|
|
|
|
// upstream(upstreamProjects: "s426206-train/master",
|
|
|
|
// threshold: hudson.model.Result.SUCCESS)
|
|
|
|
// }
|
2021-05-13 00:15:26 +02:00
|
|
|
parameters {
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
2021-05-16 09:37:12 +02:00
|
|
|
description: 'Which build to use for copying artifacts for training',
|
|
|
|
name: 'BUILD_SELECTOR_TRAINING')
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts for dataset',
|
|
|
|
name: 'BUILD_SELECTOR_DATASET')
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts for evaluation',
|
|
|
|
name: 'BUILD_SELECTOR_EVALUATION')
|
|
|
|
gitParameter branch: '', branchFilter: '.*', defaultValue: 'master', description: '', name: 'BRANCH', quickFilterEnabled: false, selectedValue: 'NONE', sortMode: 'NONE', tagFilter: '*', type: 'PT_BRANCH'
|
2021-05-13 00:15:26 +02:00
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('checkout') {
|
|
|
|
steps {
|
|
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Copy artifact') {
|
|
|
|
steps {
|
2021-05-16 12:23:49 +02:00
|
|
|
copyArtifacts filter: 'model.pt', fingerprintArtifacts: false, projectName: 's426206-training/${BRANCH}', selector: buildParameter('BUILD_SELECTOR_TRAINING')
|
2021-05-16 09:37:12 +02:00
|
|
|
copyArtifacts filter: 'val_dataset.pt', fingerprintArtifacts: false, projectName: 's426206-create-dataset', selector: buildParameter('BUILD_SELECTOR_DATASET')
|
|
|
|
copyArtifacts filter: 'metrics.tsv', fingerprintArtifacts: false, optional: true, projectName: 's426206-evaluation/master', selector: buildParameter('BUILD_SELECTOR_EVALUATION')
|
2021-05-13 00:15:26 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('docker') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
def img = docker.build('rokoch/ium:01')
|
|
|
|
img.inside {
|
2021-05-16 09:15:20 +02:00
|
|
|
sh 'chmod +x evaluation.py plot.py'
|
2021-05-13 22:20:14 +02:00
|
|
|
sh 'python3 ./evaluation.py >> metrics.tsv'
|
2021-05-16 09:15:20 +02:00
|
|
|
sh 'python3 ./plot.py'
|
2021-05-13 00:15:26 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('end') {
|
|
|
|
steps {
|
|
|
|
//Zarchiwizuj wynik
|
2021-05-16 09:15:20 +02:00
|
|
|
archiveArtifacts 'metrics.tsv, plot.png'
|
2021-05-13 00:15:26 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-05-13 22:20:14 +02:00
|
|
|
|
|
|
|
post {
|
|
|
|
success {
|
|
|
|
//Wysłanie maila
|
|
|
|
emailext body: 'Success evaluation',
|
|
|
|
subject: 's426206 evaluation',
|
|
|
|
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
|
|
|
|
}
|
|
|
|
unstable {
|
|
|
|
emailext body: 'Unstable evaluation', subject: 's426206 evaluation', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
failure {
|
|
|
|
emailext body: 'Failure evaluation', subject: 's426206 evaluation', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
changed {
|
|
|
|
emailext body: 'Changed evaluation', subject: 's426206 evaluation', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
}
|
2021-05-13 00:15:26 +02:00
|
|
|
}
|