diff --git a/evaluate/Jenkinsfile b/evaluate/Jenkinsfile new file mode 100644 index 0000000..3877abb --- /dev/null +++ b/evaluate/Jenkinsfile @@ -0,0 +1,38 @@ +pipeline { + agent any + parameters { + buildSelector ( + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR' + ) + } + stages { + stage('Checkout repository') { + steps { + checkout scm + } + } + stage('Copy artifacts') { + steps { + copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464980-create-dataset', selector: buildParameter('BUILD_SELECTOR') + copyArtifacts fingerprintArtifacts: true, projectName: 's464980-training/master', selector: buildParameter('BUILD_SELECTOR') + } + } + stage("Prediction") { + agent { + dockerfile { + filename 'Dockerfile' + reuseNode true + } + } + + steps { + sh "chmod +x ./predict.py" + sh "python ./predict.py" + archiveArtifacts artifacts: 'predictions.txt', onlyIfSuccessful: true + } + } + } + } +} \ No newline at end of file diff --git a/training/Jenkinsfile b/training/Jenkinsfile index 3950008..db92f16 100644 --- a/training/Jenkinsfile +++ b/training/Jenkinsfile @@ -37,5 +37,12 @@ pipeline { archiveArtifacts artifacts: 'model.keras', onlyIfSuccessful: true } } + stage('Run training'){ + steps{ + script { + build(job: 's464980-evaluation/master') + } + } + } } }