Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28973

naming autogenerated project does not postfix with branchname on first creation

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      According to documentation an autogenerated project should be named by the repo name and then postfixed with the branch, i.e. REPONAME_BRANCH

      In my testing i have observed that this is not the case the first time a project is created from an unknown repository notification. Then the name of the Jenkins project will match only the gitlab repo name and not prefix the branchname.

      Setup:

      Jenkins 1.615
      Gitlab hook plugin: 1.4.0
      Automatic project creation is ON
      Template based job creation is used and ONLY base project has a value
      gitlabhookpluginsetup

      Scenario:
      Prerequisite.

      Reponame FOO
      Gitlab repo FOO has webhook to jenkins using build_now
      Jenkins does not have a Project relating to repo FOO
      Reproduce:

      1. Commit to master
        branch of repo FOO
      2. Jenkins/plugin recieves notification and creates project named FOO. Expected name should be FOO_master
      3. Commit to master branch of repo FOO again and observe that Jenkins/plugin creates a new project named FOO_master. This is wierd since the Jenkins project FOO relate to the master branch
      4. Commit to develop branch of repo FOO
      5. Jenkins/Plugin recieves notification and creates project named FOO_develop as expected. According to log the project FOO_develop is based on project FOO

      nb.
      The attached image shows the setup of the plugin.

        Attachments

          Activity

          tlogik Thomas Blitz created issue -
          tlogik Thomas Blitz made changes -
          Field Original Value New Value
          Description According to documentation an autogenerated project should be named by the repo name and then postfixed with the branch, i.e. REPONAME_BRANCH

          In my testing i have observed that this is not the case the first time a project is created from an unknown repository notification. Then the name of the Jenkins project will match only the gitlab repo name and not prefix the branchname.

          Setup:

          Jenkins 1.615
          Gitlab hook plugin: 1.4.0
          Automatic project creation is ON
          Template based job creation is used and ONLY base project has a value
          gitlabhookpluginsetup

          Scenario:
          Prerequisite.

          Reponame FOO
          Gitlab repo FOO has webhook to jenkins using build_now
          Jenkins does not have a Project relating to repo FOO
          Reproduce:

          # Commit to
          {code:java}
          master
          {code}
           branch of repo FOO
          # Jenkins/plugin recieves notification and creates project named FOO. Expected name should be FOO_master
          # Commit to master branch of repo FOO again and observe that Jenkins/plugin creates a new project named FOO_master. This is wierd since the Jenkins project FOO relate to the master branch
          # Commit to develop branch of repo FOO
          # Jenkins/Plugin recieves notification and creates project named FOO_develop as expected. According to log the project FOO_develop is based on project FOO
          According to documentation an autogenerated project should be named by the repo name and then postfixed with the branch, i.e. REPONAME_BRANCH

          In my testing i have observed that this is not the case the first time a project is created from an unknown repository notification. Then the name of the Jenkins project will match only the gitlab repo name and not prefix the branchname.

          Setup:

          Jenkins 1.615
          Gitlab hook plugin: 1.4.0
          Automatic project creation is ON
          Template based job creation is used and ONLY base project has a value
          gitlabhookpluginsetup

          Scenario:
          Prerequisite.

          Reponame FOO
          Gitlab repo FOO has webhook to jenkins using build_now
          Jenkins does not have a Project relating to repo FOO
          Reproduce:

          # Commit to *master*
           branch of repo FOO
          # Jenkins/plugin recieves notification and creates project named *FOO*. Expected name should be *FOO_master*
          # Commit to master branch of repo FOO again and observe that Jenkins/plugin creates a new project named *FOO_master*. This is wierd since the Jenkins project FOO relate to the master branch
          # Commit to develop branch of repo FOO
          # Jenkins/Plugin recieves notification and creates project named *FOO_develop as expected*. According to log the project FOO_develop is based on project FOO
          tlogik Thomas Blitz made changes -
          Description According to documentation an autogenerated project should be named by the repo name and then postfixed with the branch, i.e. REPONAME_BRANCH

          In my testing i have observed that this is not the case the first time a project is created from an unknown repository notification. Then the name of the Jenkins project will match only the gitlab repo name and not prefix the branchname.

          Setup:

          Jenkins 1.615
          Gitlab hook plugin: 1.4.0
          Automatic project creation is ON
          Template based job creation is used and ONLY base project has a value
          gitlabhookpluginsetup

          Scenario:
          Prerequisite.

          Reponame FOO
          Gitlab repo FOO has webhook to jenkins using build_now
          Jenkins does not have a Project relating to repo FOO
          Reproduce:

          # Commit to *master*
           branch of repo FOO
          # Jenkins/plugin recieves notification and creates project named *FOO*. Expected name should be *FOO_master*
          # Commit to master branch of repo FOO again and observe that Jenkins/plugin creates a new project named *FOO_master*. This is wierd since the Jenkins project FOO relate to the master branch
          # Commit to develop branch of repo FOO
          # Jenkins/Plugin recieves notification and creates project named *FOO_develop as expected*. According to log the project FOO_develop is based on project FOO
          According to documentation an autogenerated project should be named by the repo name and then postfixed with the branch, i.e. REPONAME_BRANCH

          In my testing i have observed that this is not the case the first time a project is created from an unknown repository notification. Then the name of the Jenkins project will match only the gitlab repo name and not prefix the branchname.

          Setup:

          Jenkins 1.615
          Gitlab hook plugin: 1.4.0
          Automatic project creation is ON
          Template based job creation is used and ONLY base project has a value
          gitlabhookpluginsetup

          Scenario:
          Prerequisite.

          Reponame FOO
          Gitlab repo FOO has webhook to jenkins using build_now
          Jenkins does not have a Project relating to repo FOO
          Reproduce:

          # Commit to *master*
           branch of repo FOO
          # Jenkins/plugin recieves notification and creates project named *FOO*. Expected name should be *FOO_master*
          # Commit to master branch of repo FOO again and observe that Jenkins/plugin creates a new project named *FOO_master*. This is wierd since the Jenkins project FOO relate to the master branch
          # Commit to develop branch of repo FOO
          # Jenkins/Plugin recieves notification and creates project named *FOO_develop as expected*. According to log the project FOO_develop is based on project FOO

          nb.
          The attached image shows the setup of the plugin.
          javiplx Javier Palacios made changes -
          Resolution Not A Defect [ 7 ]
          Status Open [ 1 ] Resolved [ 5 ]
          tlogik Thomas Blitz made changes -
          Issue Type Bug [ 1 ] New Feature [ 2 ]
          tlogik Thomas Blitz made changes -
          Resolution Not A Defect [ 7 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          javiplx Javier Palacios made changes -
          Resolution Won't Do [ 10001 ]
          Status Reopened [ 4 ] Resolved [ 5 ]
          javiplx Javier Palacios made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 163837 ] JNJira + In-Review [ 208893 ]

            People

            Assignee:
            javiplx Javier Palacios
            Reporter:
            tlogik Thomas Blitz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: