diff --git a/evaluation/Jenkinsfile b/evaluation/Jenkinsfile index bb165b8..34b2406 100644 --- a/evaluation/Jenkinsfile +++ b/evaluation/Jenkinsfile @@ -1,6 +1,20 @@ pipeline { agent any + parameters { + gitParameter( + branchFilter: 'origin/(.*)', + defaultValue: 'origin/main', + description: 'Branch to build', + name: 'BRANCH' + ) + buildSelector( + defaultSelector: lastSuccessful(), + description: 'Build to extract artifacts from', + name: 'BUILD_SELECTOR' + ) + } + stages { stage('Clone repository') { steps { @@ -17,7 +31,11 @@ pipeline { } steps { - copyArtifacts(projectName: 's464863-training/main', filter: 'models/model.pth', selector: lastSuccessful()) + def projectName = "s464863-training/${params.BRANCH}".replace('origin/', '') + echo "Project name: ${projectName}" + def projectName2 = "z-s464863-create-dataset/${params.BRANCH}" + echo "Project name: ${projectName2}" + copyArtifacts(projectName: projectName, filter: 'models/model.pth', selector: buildParameter('BUILD_SELECTOR')) copyArtifacts(projectName: 'z-s464863-create-dataset', filter: 'datasets/test.csv', selector: lastSuccessful()) copyArtifacts(projectName: 's464863-evaluation/main', filter: 'metrics.csv', selector: lastSuccessful(), optional: true) }