Jenkinsfile update #wip
This commit is contained in:
parent
f4e07d4b1d
commit
5d94421172
59
Jenkinsfile_eval_tensorflow
Normal file
59
Jenkinsfile_eval_tensorflow
Normal file
@ -0,0 +1,59 @@
|
||||
pipeline {
|
||||
agent any
|
||||
parameters {
|
||||
buildSelector(
|
||||
defaultSelector: lastSuccessful(),
|
||||
description: 'Which build to use for copying artifacts',
|
||||
name: 'BUILD_SELECTOR')
|
||||
|
||||
buildSelector(
|
||||
defaultSelector: lastSuccessful(),
|
||||
description: 'Which build to use for copying train artifacts',
|
||||
name: 'BUILD_SELECTOR_Train')
|
||||
|
||||
buildSelector(
|
||||
defaultSelector: lastSuccessful(),
|
||||
description: 'Which build to use for copying evaluation artifacts',
|
||||
name: 'BUILD_SELECTOR_Evaluation')
|
||||
|
||||
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('copy artifacts'){
|
||||
steps {
|
||||
copyArtifacts(fingerprintArtifacts: true, projectName: 's434780-create-dataset', selector: buildParameter('BUILD_SELECTOR'))
|
||||
copyArtifacts(fingerprintArtifacts: true, projectName: 's434780-training/master', selector: buildParameter('BUILD_SELECTOR_Train'))
|
||||
copyArtifacts(fingerprintArtifacts: true, optional:true, projectName: 's434780-evaluation/master', selector: buildParameter('BUILD_SELECTOR_Evaluation'))
|
||||
}
|
||||
}
|
||||
|
||||
stage('evaluation') {
|
||||
steps {
|
||||
script {
|
||||
def img = docker.build('s434780/ium:1.0')
|
||||
img.inside {
|
||||
'''
|
||||
chmod +x eval-tensorflow.py
|
||||
./eval-tensorflow.py'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('archiveArtifacts') {
|
||||
steps{
|
||||
archiveArtifacts 'evaluation.txt'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
emailext body: 'Success', subject: 's434780 evaluation', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
||||
}
|
||||
|
||||
failure {
|
||||
emailext body: 'Failed', subject: 's434780 evaluation', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
||||
}
|
||||
}
|
||||
}
|
@ -17,8 +17,9 @@ pipeline {
|
||||
script {
|
||||
def img = docker.build('s434780/ium:1.0')
|
||||
img.inside {
|
||||
sh 'chmod +x train-tensorflow.py'
|
||||
sh 'python3 ./train-tensorflow.py'
|
||||
'''
|
||||
chmod +x train-tensorflow.py
|
||||
./train-tensorflow.py'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user