2021-05-16 20:10:28 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
parameters {
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Copy artifact') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts filter: 'dev.csv, train.csv, test.csv', fingerprintArtifacts: false, projectName: 's434780-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('docker') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
def img = docker.build('s434780/ium:1.0')
|
|
|
|
img.inside {
|
2021-05-16 23:10:33 +02:00
|
|
|
'''
|
|
|
|
chmod +x train-tensorflow.py
|
|
|
|
./train-tensorflow.py'''
|
2021-05-16 20:10:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('archiveArtifacts') {
|
|
|
|
steps {
|
2021-05-17 12:25:40 +02:00
|
|
|
archiveArtifacts 'trained_model/**'
|
2021-05-16 20:10:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
success {
|
|
|
|
emailext body: 'Success train', subject: 's434780 train', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
|
|
|
|
failure {
|
|
|
|
emailext body: 'Failed train', subject: 's434780 train', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|