jenkinsci / gitlab-hook-plugin

Deprecated, see https://www.jenkins.io/jep/7
133 stars 42 forks source link

Support for Jobs created using the Folders plugin #34

Open weeniearms opened 8 years ago

weeniearms commented 8 years ago

Currently there are two issues when using the auto job creation feature in combination with jobs that are grouped into folders using the Folders plugin:

  1. Newly created jobs do not have the same parent as the master job
  2. Duplicate jobs are created if the job is grouped in a folder (i.e. not under root). One of them is correct, while the other seems incomplete (description and scm not updated).

No.1 can be solved by simply moving the job under the appropriate parent. This can be accomplished by adding the following line to the with method in the CreateProjectForBranch class right after the project i saved:

branch_project = Java.hudson.model.Items.move(branch_project, copy_from.jenkins_project.parent)

Not sure how to solve No.2, as it might be an issue with the Jenkins API responsible for copying the job. I'll try to come up with a setup that will allow to easily reproduce this issue.

HadesArchitect commented 6 years ago

Hey guys, any updates there? Have you found a solution? We still experience it on Jenkins v2.108, Plugin v1.4.2