2021-05-07 22:36:28 +02:00
|
|
|
pipeline {
|
|
|
|
agent {dockerfile true}
|
|
|
|
parameters {
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('copyArtifacts') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's430705-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
2021-05-10 15:41:02 +02:00
|
|
|
sh 'python3 lab06_training.py'
|
2021-05-10 17:30:47 +02:00
|
|
|
sh 'ls -l'
|
2021-05-10 17:51:02 +02:00
|
|
|
sh 'pwd'
|
2021-05-10 15:41:02 +02:00
|
|
|
|
2021-05-07 22:36:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Archive artifacts') {
|
|
|
|
steps{
|
2021-05-10 19:56:32 +02:00
|
|
|
sh 'zip /var/lib/jenkins/workspace/s430705-training_master/model.zip /var/lib/jenkins/workspace/s430705-training_master/model_movies'
|
2021-05-10 19:54:08 +02:00
|
|
|
archiveArtifacts 'model.zip'
|
2021-05-07 22:36:28 +02:00
|
|
|
}
|
|
|
|
}
|
2021-05-07 23:03:14 +02:00
|
|
|
stage('Send notification'){
|
|
|
|
steps{
|
|
|
|
emailext body: currentBuild.result ?: 'SUCCESS +1 YEA',
|
|
|
|
subject: 's43705',
|
|
|
|
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
}
|
2021-05-07 22:36:28 +02:00
|
|
|
}
|
|
|
|
}
|