ium_470607/lab5/eval/Jenkinsfile
2021-05-16 13:48:37 +02:00

64 lines
2.3 KiB
Groovy

pipeline {
agent none
options { copyArtifactPermission('s434684-evaluation/master') }
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
}
stages {
stage('copy files') {
agent any
steps {
sh '''
cp ./lab5/eval/Dockerfile .
cp ./lab5/eval/script.sh .
cp ./lab5/eval/eval.py .
cp ./lab5/eval/requirements.txt .
'''
}
}
stage('docker') {
agent {
docker {
image 'kubakonieczny/ium:v2.0'
}
}
stages {
stage('copyArtifacts') {
steps {
copyArtifacts fingerprintArtifacts: true,
projectName: 's470607-create-dataset',
selector: buildParameter('BUILD_SELECTOR')
copyArtifacts fingerprintArtifacts: true,
projectName: "s470607-training/${params.BRANCH}",
selector: buildParameter('BUILD_SELECTOR')
copyArtifacts fingerprintArtifacts: true,
optional: true,
projectName: "s470607-evaluation/${params.BRANCH}",
selector: buildParameter('BUILD_SELECTOR')
}
}
stage('ls') {
steps {
sh '''
chmod +x script.sh
ls -lah
./script.sh
ls -lah
'''
}
}
stage('archive artifact') {
steps {
archiveArtifacts 'eval.csv'
}
}
}
}
}
}