ium_z487174/Multibranch_evaluation.py

55 lines
1.5 KiB
Python

pipeline {
agent any
parameters{
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
}
stages {
stage('Clear') {
steps {
sh 'rm -rf *'
}
}
stage('Clone Git') {
steps {
sh 'git clone https://git.wmi.amu.edu.pl/s487174/ium_z487174'
}
}
stage('Copy Artifacts') {
steps {
copyArtifacts(projectName: 'z-s487174-training/master', fingerprintArtifacts: true)
}
}
stage('Copy Artifacts From Evaluation') {
steps {
copyArtifacts(projectName: 'z-s487174-evaluation/master', fingerprintArtifacts: true, optional: true)
}
}
stage('copy_artifacts_test_data') {
steps {
copyArtifacts(projectName: 'z-s487174-create-dataset', filter: 'data_test.csv,data_test2.csv', fingerprintArtifacts: true)
}
}
stage('Docker') {
agent {
dockerfile {
filename 'Dockerfile'
dir 'ium_z487174',
reuseNode true
}
}
steps {
sh 'ls -a'
sh 'python ./ium_z487174/predict.py'
sh 'python ./ium_z487174/generate_plot.py'
archiveArtifacts 'data_prediction.csv'
archiveArtifacts 'data_metrics.csv'
archiveArtifacts 'image_metrics.png'
}
}
stage('Clear') {
steps {
sh 'rm -rf *'
}
}
}
}