ium_470607/lab5/eval/Jenkinsfile

77 lines
2.7 KiB
Plaintext
Raw Permalink Normal View History

2021-05-15 18:19:27 +02:00
pipeline {
agent none
2021-05-16 23:13:59 +02:00
options { copyArtifactPermission('s470607-evaluation/master') }
2021-05-15 18:19:27 +02:00
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
2021-05-15 22:45:51 +02:00
name: 'BUILD_SELECTOR'
)
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
2021-05-15 18:19:27 +02:00
}
stages {
stage('copy files') {
agent any
steps {
sh '''
2021-05-15 19:35:54 +02:00
cp ./lab5/eval/Dockerfile .
cp ./lab5/eval/script.sh .
cp ./lab5/eval/eval.py .
cp ./lab5/eval/requirements.txt .
2021-05-15 18:19:27 +02:00
'''
}
}
stage('docker') {
2021-05-16 13:48:37 +02:00
agent {
docker {
2021-05-17 12:11:19 +02:00
image 'kubakonieczny/ium:train-sacred-mlflow2'
2021-05-16 13:48:37 +02:00
}
}
2021-05-15 18:19:27 +02:00
stages {
stage('copyArtifacts') {
2021-05-15 19:59:46 +02:00
steps {
2021-05-15 22:45:51 +02:00
copyArtifacts fingerprintArtifacts: true,
projectName: 's470607-create-dataset',
selector: buildParameter('BUILD_SELECTOR')
copyArtifacts fingerprintArtifacts: true,
2021-05-15 23:06:13 +02:00
projectName: "s470607-training/${params.BRANCH}",
2021-05-15 22:45:51 +02:00
selector: buildParameter('BUILD_SELECTOR')
copyArtifacts fingerprintArtifacts: true,
optional: true,
2021-05-15 23:06:13 +02:00
projectName: "s470607-evaluation/${params.BRANCH}",
2021-05-15 22:45:51 +02:00
selector: buildParameter('BUILD_SELECTOR')
2021-05-15 18:19:27 +02:00
}
}
stage('ls') {
steps {
sh '''
chmod +x script.sh
ls -lah
./script.sh
ls -lah
'''
}
}
stage('archive artifact') {
steps {
archiveArtifacts 'eval.csv'
2021-05-16 23:01:34 +02:00
archiveArtifacts 'plot.png'
2021-05-15 18:19:27 +02:00
}
}
}
}
}
2021-05-16 16:22:02 +02:00
post {
success {
mail body: 'SUCCESS',
2021-05-16 16:27:49 +02:00
subject: 's470607-evaluation',
2021-05-16 16:22:02 +02:00
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
mail body: 'FAILURE',
2021-05-16 16:27:49 +02:00
subject: 's470607-evaluation',
2021-05-16 16:22:02 +02:00
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
2021-05-15 18:19:27 +02:00
}