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

Display Organization/Project and Repository name(s) on the job details page

    XMLWordPrintable

Details

    Description

      Currently when checking out multiple repositories or a single repository with submodules the Git plugin only displays the commit sha(s) and branch name(s) for each of the repositories being checked out on the job details page and as part of the Git Build Data.

      It would be useful to have the Organization/Project and Repository name(s) displayed alongside the commit sha(s) and branch name(s). This makes it easier to associate the changes to the repository.

      Attachments

        Issue Links

          Activity

            ianw Ian Williams added a comment - - edited

            As the objective of this feature is to display the OrgName/RepoName on the Job Build Log page, you'd have to create a set of dummy build logs that reflect all the possible combinations of legitimate Git connection types/protocols (git:, http(s):, ssh:, ftp(s):, file: ), to the various Git remote host types, both without an the permutations of supported Org structures, including things like a plain file: or plain remote connection, with and without password or token, etc. (pay attention to Azure Devops format which uses an unconventional format, with "/_git" ). Then test cases will validate the configured regex produce the expected results.

            Your requirements should be able to be validated passing a known set of inputs like Mark Waite listed and I added to. Segmented test cases should validate each configuration target type separately for the various connection options, or otherwise partitioned.

            One interesting feature is used in the REST List Parameter plugin and Build Failure Analyzer. Both plugins support a Test validation option as part of the configuration.

            ianw Ian Williams added a comment - - edited As the objective of this feature is to display the OrgName/RepoName on the Job Build Log page, you'd have to create a set of dummy build logs that reflect all the possible combinations of legitimate Git connection types/protocols (git:, http(s):, ssh:, ftp(s):, file: ), to the various Git remote host types, both without an the permutations of supported Org structures, including things like a plain file: or plain remote connection, with and without password or token, etc. (pay attention to Azure Devops format which uses an unconventional format, with "/_git" ). Then test cases will validate the configured regex produce the expected results. Your requirements should be able to be validated passing a known set of inputs like Mark Waite listed and I added to. Segmented test cases should validate each configuration target type separately for the various connection options, or otherwise partitioned. One interesting feature is used in the REST List Parameter plugin and Build Failure Analyzer . Both plugins support a Test validation option as part of the configuration.
            hrushi20 Hrushi20 added a comment - - edited

            ianw , can you go through my draft pull request. Not sure how to create dummy build logs. I am actually new to testing and finding some difficulties. I feel the way I implemented the Global configuration is not correct. The global configuration regex takes in a single input regex and validates all the urls according to my implementation. Is the global configuration regex only for custom domains? Also Internally do I need to create a regex for default git urls.

             

            Pull request: link

            hrushi20 Hrushi20 added a comment - - edited ianw , can you go through my draft pull request. Not sure how to create dummy build logs. I am actually new to testing and finding some difficulties. I feel the way I implemented the Global configuration is not correct. The global configuration regex takes in a single input regex and validates all the urls according to my implementation. Is the global configuration regex only for custom domains? Also Internally do I need to create a regex for default git urls.   Pull request: link
            krisstern Kris Stern added a comment -

            hrushi20, would just like to chip in and say that the implementation can vary depending on your conception of it and how it will be implemented. It could be either a list of URL regex patterns or a single URL regex pattern. However, if you are aiming to use one single URL regex pattern than be aware that this might be harder to maintain and use down the line. Other factors to consider would be customisability and usability as a global option as suggested above. 

            krisstern Kris Stern added a comment - hrushi20 , would just like to chip in and say that the implementation can vary depending on your conception of it and how it will be implemented. It could be either a list of URL regex patterns or a single URL regex pattern. However, if you are aiming to use one single URL regex pattern than be aware that this might be harder to maintain and use down the line. Other factors to consider would be customisability and usability as a global option as suggested above. 
            krisstern Kris Stern added a comment -

            For testing maybe the list of example URLs could be checked one by one for assertion to be `true`. You will need to at least test the organisation and project repo in two separate tests for example. If you are testing a list of possible URL regex patterns, be sure to classify the URLs accordingly and write a test for each category. It is up to you to propose a viable solution, so we are only making suggestions to you. You have the freedom to decide ultimately how you would like to approach the problem. 

            krisstern Kris Stern added a comment - For testing maybe the list of example URLs could be checked one by one for assertion to be `true`. You will need to at least test the organisation and project repo in two separate tests for example. If you are testing a list of possible URL regex patterns, be sure to classify the URLs accordingly and write a test for each category. It is up to you to propose a viable solution, so we are only making suggestions to you. You have the freedom to decide ultimately how you would like to approach the problem. 
            hrushi20 Hrushi20 added a comment -

            Multiple Regex can be added in the global configuration. Each regex needs to be separated by `&&&` for now. All urls stated by markewaite are running successfully. Looking for edge cases to solve. I'll try adding more test cases related to azure and other protocols.

            hrushi20 Hrushi20 added a comment - Multiple Regex can be added in the global configuration. Each regex needs to be separated by `&&&` for now. All urls stated by markewaite are running successfully. Looking for edge cases to solve. I'll try adding more test cases related to azure and other protocols.

            People

              Unassigned Unassigned
              tarungidwani Tarun Gidwani
              Votes:
              9 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated: