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

Git Global tool configuration installations ... consistency

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • Jenkins:2.263.4
      git-plugin:4.5.0

      Under ${JENKINS_URL}//configureTools/, most Tool Configurations which have a tool configured have a button showing "<Tool installations ...". The Git configuration simply shows the complete details.

      Request the UI be consistent with other tool sand show "Git installations ..." if configured, "Add Git" if not.

       

          [JENKINS-65257] Git Global tool configuration installations ... consistency

          Mark Waite added a comment - - edited

          Thanks for the report! I assume you want consistency so that the default list of git installations is not visible until the user presses a button labeled "Git installations". That would make the git plugin user interface consistent with the other tools like JDK, Ant, and Maven.

          The inconsistency is visible in this sequence:

          Before installing git plugin

          After installing git plugin (note the expanded)

          After deleting default git plugin tool

          After reopening global tool configuration

          After adding git tool

          Mark Waite added a comment - - edited Thanks for the report! I assume you want consistency so that the default list of git installations is not visible until the user presses a button labeled "Git installations". That would make the git plugin user interface consistent with the other tools like JDK, Ant, and Maven. The inconsistency is visible in this sequence: Before installing git plugin After installing git plugin (note the expanded) After deleting default git plugin tool After reopening global tool configuration After adding git tool

          Ian Williams added a comment -

          markewaite , correct in your asssesment. I had not gone to trace back on a clean install, so did not realize/recall it had a default.

          So, as-is, out-of-the-box should simply show a button label: "Git installations ...". Expanding would show the OOB "default" Git install, or all installs if more than one added. If the default is removed, then button label: "Add Git".  This issue is directly to address the above inconsistency.

           


          Your screenshots rather highlight a broader inconsistency which made me play with a clean install, and questions, probably for a separate ticket, depending on guidance.

          Start a clean install, skip plugin install. You see as shown in screenshot 01.

          "Maven Configuration", with "use default maven ... settings"

          "JDK",  with "Add JDK"

          "Maven", with "Add Maven"

          Create a Freestyle job, the build step, "invoke top-level maven targets", "Advanced" has the above Gloval "default maven settings" Maven Configuration set.  I presume it resolves mvn using $M2_HOME or searching $PATH for mvn (or via a bundled plugin ?) .

          I know Freestyle job hides "JDK" option unless there's a choice >1, taking default "(System)". I presume this is resolves from $JAVA_HOME, or searching $PATH for java (or via a bundled plugin ?) .

          Now it gets weird. Add one maven installation and the Freestyle Job step is given a choice between "System" and the user value.

          Add a JDK installation and the Freestyle Job is NOT given a JDK choice. User must add two JDK to then get a choice between "System" and the two user values.

          This is as documented on How to set the available JDK versions? It's just not consistent with the maven or Git options; User can't choose between System and one JDK.

          • If there is no JDK configured in the global options, Jenkins will default to use whatever is available on PATH.
          • If there is one JDK configured in the global options, Jenkins will implicitly use that one.
          • If there are 2+ JDKs configured in the global options, Jenkins will use whatever is configured in the job, defaulting to use what’s on PATH (the UI option is called “(Default)”).

          I know there's no GIT_HOME value, but the displayed default assumes it's available on the PATH. For consistency, the Git plugin should just assume git binary is available on the PATH (ie: (System), just as JDK and maven do and not show the "default" Git on the Global Tool configuration page.

          I understand there is no tool location option within the Freestyle Job configuration for Git. I presume then an Advanced Tool location override on the SCM step would be required to balance.

          Thoughts?

           

          Ian Williams added a comment - markewaite , correct in your asssesment. I had not gone to trace back on a clean install, so did not realize/recall it had a default. So, as-is, out-of-the-box should simply show a button label: "Git installations ...". Expanding would show the OOB "default" Git install, or all installs if more than one added. If the default is removed, then button label: "Add Git".  This issue is directly to address the above inconsistency.   Your screenshots rather highlight a broader inconsistency which made me play with a clean install, and questions, probably for a separate ticket, depending on guidance. Start a clean install, skip plugin install. You see as shown in screenshot 01. "Maven Configuration", with "use default maven ... settings" "JDK",  with "Add JDK" "Maven", with "Add Maven" Create a Freestyle job, the build step, "invoke top-level maven targets", "Advanced" has the above Gloval "default maven settings" Maven Configuration set.  I presume it resolves mvn using $M2_HOME or searching $PATH for mvn (or via a bundled plugin ?) . I know Freestyle job hides "JDK" option unless there's a choice >1, taking default "(System)". I presume this is resolves from $JAVA_HOME, or searching $PATH for java (or via a bundled plugin ?) . Now it gets weird. Add one maven installation and the Freestyle Job step is given a choice between "System" and the user value. Add a JDK installation and the Freestyle Job is NOT given a JDK choice. User must add two JDK to then get a choice between "System" and the two user values. This is as documented on How to set the available JDK versions?  It's just not consistent with the maven or Git options; User can't choose between System and one JDK. If there is no JDK configured in the global options, Jenkins will default to use whatever is available on PATH. If there is one JDK configured in the global options, Jenkins will implicitly use that one. If there are 2+ JDKs configured in the global options, Jenkins will use whatever is configured in the job, defaulting to use what’s on PATH (the UI option is called “(Default)”). I know there's no GIT_HOME value, but the displayed default assumes it's available on the PATH. For consistency, the Git plugin should just assume git binary is available on the PATH (ie: (System), just as JDK and maven do and not show the "default" Git on the Global Tool configuration page. I understand there is no tool location option within the Freestyle Job configuration for Git. I presume then an Advanced Tool location override on the SCM step would be required to balance. Thoughts?  

          Ian Williams added a comment -

          I guess there is already an Unresolved issue for JDK choice - "JENKINS-10191 - JDK selection is hidden even when a JDK is configured" which is explained by the How to set the available JDK versions; if no JDK, configured, assume (System) is the default); if ONE JDK configured, assume that is the default, no user choice; if multiple JDK configured, give user choice, including (System).

          Ian Williams added a comment - I guess there is already an Unresolved issue for JDK choice - " JENKINS-10191 - JDK selection is hidden even when a JDK is configured" which is explained by the How to set the available JDK versions ; if no JDK, configured, assume (System) is the default); if ONE JDK configured, assume that is the default, no user choice; if multiple JDK configured, give user choice, including (System).

            Unassigned Unassigned
            ianw Ian Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: