ium_426206/Jenkinsfile_train

64 lines
1.8 KiB
Plaintext
Raw Normal View History

2021-05-07 20:16:31 +02:00
pipeline {
agent any
2021-05-07 22:03:16 +02:00
parameters {
2021-05-07 23:03:14 +02:00
string(
defaultValue: '',
description: 'Parametry trenowania.',
name: 'PARAMETRY',
trim: false
)
2021-05-07 22:03:16 +02:00
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR')
}
2021-05-07 20:16:31 +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']]])
}
}
2021-05-07 21:37:28 +02:00
stage('Copy artifact') {
steps {
2021-05-07 22:00:21 +02:00
copyArtifacts filter: 'train_dataset.pt,val_dataset.pt', fingerprintArtifacts: false, projectName: 's426206-create-dataset', selector: buildParameter('BUILD_SELECTOR')
2021-05-07 21:37:28 +02:00
}
}
2021-05-07 20:16:31 +02:00
stage('docker') {
steps {
script {
def img = docker.build('rokoch/ium:01')
img.inside {
sh 'chmod +x dlgssdpytorch.py'
2021-05-07 23:03:14 +02:00
sh 'python3 ./dlgssdpytorch.py $PARAMETRY'
2021-05-07 20:16:31 +02:00
}
}
}
}
stage('end') {
steps {
//Zarchiwizuj wynik
archiveArtifacts 'model.pt'
2021-05-07 23:03:14 +02:00
}
}
2021-05-07 23:06:24 +02:00
}
post {
success {
//Wysłanie maila
emailext body: 'SUCCESS',
subject: 's426206',
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
emailext body: 'UNSTABLE', subject: 's426206', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
emailext body: 'FAILURE', subject: 's426206', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
emailext body: 'CHANGED', subject: 's426206', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
2021-05-07 20:16:31 +02:00
}
}
}