From fc101abd9de8b97ac83f9e93b243f26de5647132 Mon Sep 17 00:00:00 2001 From: dany Date: Thu, 29 Sep 2022 23:20:38 +0200 Subject: [PATCH] Update 'Jenkinsfile' --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c559083..dcbdc39 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,6 @@ // need to approve all static functions in Dashboard > Manage Jenkins > ScriptApproval -def ArrayList copyArtifactsByBranches(projectName){ - def jobs = jenkins.model.Jenkins.instance.getItemByFullName('gitea-sync/antos').getAllJobs(); +def ArrayList getBranches(projectName){ + def jobs = jenkins.model.Jenkins.instance.getItemByFullName(projectName).getAllJobs(); Iterator iterator = jobs.iterator(); def arr = new ArrayList(); @@ -19,7 +19,7 @@ def generateStage(name) { } } -def parallelStagesMap = jenkins.model.Jenkins.instance.getItemByFullName('gitea-sync/antos').getAllJobs().collectEntries { +def parallelStagesMap = getBranches("gitea-sync/antos").collectEntries { ["${it}" : generateStage(it)] }