Jan Nowak
d633875c90
All checks were successful
s426206-evaluation/pipeline/head This commit looks good
65 lines
2.2 KiB
Plaintext
65 lines
2.2 KiB
Plaintext
pipeline {
|
|
agent any
|
|
triggers {
|
|
upstream(upstreamProjects: "s426206-train",
|
|
threshold: hudson.model.Result.SUCCESS)
|
|
}
|
|
parameters {
|
|
buildSelector(
|
|
defaultSelector: lastSuccessful(),
|
|
description: 'Which build to use for copying artifacts',
|
|
name: 'BUILD_SELECTOR')
|
|
}
|
|
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 {
|
|
copyArtifacts filter: 'model.pt', fingerprintArtifacts: false, projectName: 's426206-training/master', selector: buildParameter('BUILD_SELECTOR')
|
|
copyArtifacts filter: 'val_dataset.pt', fingerprintArtifacts: false, projectName: 's426206-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
copyArtifacts filter: 'metrics.tsv', fingerprintArtifacts: false, optional: true, projectName: 's426206-evaluation/master', selector: buildParameter('BUILD_SELECTOR')
|
|
}
|
|
}
|
|
stage('docker') {
|
|
steps {
|
|
script {
|
|
def img = docker.build('rokoch/ium:01')
|
|
img.inside {
|
|
sh 'chmod +x evaluation.py'
|
|
sh 'python3 ./evaluation.py >> metrics.tsv'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('end') {
|
|
steps {
|
|
//Zarchiwizuj wynik
|
|
archiveArtifacts 'model.pt, metrics.tsv, plot.png'
|
|
}
|
|
}
|
|
}
|
|
|
|
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'
|
|
}
|
|
}
|
|
}
|