Обновить pipelines/gitea-events/jobs-runner.groovy (!47)
add condition by branch Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/47
This commit is contained in:
@@ -62,10 +62,9 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), yaml: g
|
||||
String branch = getBranch(fullJSON)
|
||||
|
||||
currentBuild.description = "Repo: ${fullJSON.repository.full_name} $branch"
|
||||
|
||||
// Check project in map and start to work with it
|
||||
projects[projectName].each { Map project ->
|
||||
currentBuild.displayName = "#${env.BUILD_ID} Run for all branches"
|
||||
if (project.branches.contains(branch) || project.branches == []) {
|
||||
currentBuild.displayName = "#${env.BUILD_ID} Run on ${branch}"
|
||||
|
||||
project.jobs.each { Map job ->
|
||||
build job: job.job,
|
||||
@@ -78,6 +77,7 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), yaml: g
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Start tasks for all repositories by PR
|
||||
if (fullJSON.action == 'opened') {
|
||||
|
||||
Reference in New Issue
Block a user