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

Revisit Git repository creation flow credential setup

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • blueocean-plugin
    • None
    • iapetus, 1.0, Blue Ocean 1.0-rc3

      Scope

      • Drop down with existing credentials & add button to the right.
      • If no existing credentials, show "none" in dropdown
      • Clicking add launches the modal to add credential.
      • Once credential is added, modal is dismissed & the credential that was just added populates the dropdown
      • Do not provide the "Use system ssh" option - remove it for now and it can be revisited later if there are too many complaints
      • Integrate eager validation as described in JENKINS-41597 into this ticket
      • Integrate showing/hiding credentials dropdown and "add" button based on credential permissions JENKINS-41573

      Design brief
      We need a better design for using existing credentials or creating a new credential. I realise this was my original design but it is confusing.

      Perhaps we ask them to choose between a new credential or existing one then show the form to select/create a new credential depending on the option picked.

      Should we show "existing credential" if there there are no existing credentials to pick from?

        1. Git Step 1.png
          Git Step 1.png
          72 kB
        2. Git Step 1 Copy.png
          Git Step 1 Copy.png
          61 kB
        3. screenshot-1.png
          screenshot-1.png
          7 kB

          [JENKINS-42120] Revisit Git repository creation flow credential setup

          Brody Maclean added a comment -

          • Drop down with existing credentials & add button to the right.
          • If no existing credentials, show "none" in dropdown
          • Clicking add launches the modal to add credential.
          • Once credential is added, modal is dismissed & the credential that was just added populates the dropdown

          Zeplin
          https://zpl.io/ZwF4sE
          https://zpl.io/Z2jTRru

          Brody Maclean added a comment - Drop down with existing credentials & add button to the right. If no existing credentials, show "none" in dropdown Clicking add launches the modal to add credential. Once credential is added, modal is dismissed & the credential that was just added populates the dropdown Zeplin https://zpl.io/ZwF4sE https://zpl.io/Z2jTRru

          Cliff Meyers added a comment -

          brody jamesdumay If it's not too much of a hassle, perhaps the screen shots could be updated with some small changes (see below). I know these screens inside/out but the rest of the team doesn't... so if they ever pick one of these tickets it up it may lead to confusion.

          1. The "Connect" step screenie is missing the Create Pipeline button.
          2. The "System SSH" option should be removed from Add Credential dialog.
          3. The reference to "Github" at the top of the Add Credential dialog should be removed. I am not sure if there should be different instructive text... it's reasonably self explanatory to me.

          Questions

          1. Is there any "success feedback" that should be shown either in the modal or the "Connect" step after the credential is created?

          Cliff Meyers added a comment - brody jamesdumay If it's not too much of a hassle, perhaps the screen shots could be updated with some small changes (see below). I know these screens inside/out but the rest of the team doesn't... so if they ever pick one of these tickets it up it may lead to confusion. The "Connect" step screenie is missing the Create Pipeline button. The "System SSH" option should be removed from Add Credential dialog. The reference to "Github" at the top of the Add Credential dialog should be removed. I am not sure if there should be different instructive text... it's reasonably self explanatory to me. Questions Is there any "success feedback" that should be shown either in the modal or the "Connect" step after the credential is created?

          Cliff Meyers added a comment -

          When we folded JENKINS-41597 there were a few open questions that got lost. Here they are:

          1. If the user enters in an invalid URL (say for example https://github.com/cliffmeyers/repo-that-doesnt-exist) and presses "Create", do we show a validation error alongside the "Repository URL" title? Or are we going to show some kind of error step?
          2. If the user's access to the repo is denied (say private repo and invalid credential), do we show an error alongside the "Credentials" title? Or error step?
          3. There is a known issue where a user might enter a "https" URL and pick a SSH key credential - the SCM plugin won't allow this combo and falls back to anonymous access. Should we prevent this selection, show some kind of warning before actually proceeding, etc
          4. Similar to above, the same is true when the user picks a "ssh" URL and a username / password credential - it won't use that credential.

          cc michaelneale as you might be able to facilitate some answers. Thanks

          Cliff Meyers added a comment - When we folded JENKINS-41597 there were a few open questions that got lost. Here they are: If the user enters in an invalid URL (say for example https://github.com/cliffmeyers/repo-that-doesnt-exist ) and presses "Create", do we show a validation error alongside the "Repository URL" title? Or are we going to show some kind of error step? If the user's access to the repo is denied (say private repo and invalid credential), do we show an error alongside the "Credentials" title? Or error step? There is a known issue where a user might enter a "https" URL and pick a SSH key credential - the SCM plugin won't allow this combo and falls back to anonymous access. Should we prevent this selection, show some kind of warning before actually proceeding, etc Similar to above, the same is true when the user picks a "ssh" URL and a username / password credential - it won't use that credential. cc michaelneale as you might be able to facilitate some answers. Thanks

          James Dumay added a comment -

          cliffmeyers here are some answers:

          1. we should show a form validation error rather than a Error Step
          2. Form validation error
          3. If we do end up with https or ssh as the protocol could we disable the options that won't work?
          4. Same as above

          James Dumay added a comment - cliffmeyers here are some answers: we should show a form validation error rather than a Error Step Form validation error If we do end up with https or ssh as the protocol could we disable the options that won't work? Same as above

          Cliff Meyers added a comment -

          Should there be some kind of close button on the Add Credential dialog?

          Cliff Meyers added a comment - Should there be some kind of close button on the Add Credential dialog?

          James Dumay added a comment -

          cliffmeyers "Cancel" will do

          James Dumay added a comment - cliffmeyers "Cancel" will do

          Brody Maclean added a comment -

          cliffmeyers Looks like jamesdumay beat me to the punch.
          Let me know if there are any unanswered questions.

          FYI Cancel should be the secondary button

          Brody Maclean added a comment - cliffmeyers Looks like jamesdumay beat me to the punch. Let me know if there are any unanswered questions. FYI Cancel should be the secondary button

          Cliff Meyers added a comment -

          This ticket is still in-progress but pending some merging and fixes in JENKINS-41397 that are currently in-progress. I think the UI work is basically done but I uncovered some unexpected behavior in the REST API while testing. Unfortunately testing this change is very time consuming given the permutations (roughly 2^5... SCM provider, repo visibility, URL scheme, credential type, credential validity).

          Cliff Meyers added a comment - This ticket is still in-progress but pending some merging and fixes in JENKINS-41397 that are currently in-progress. I think the UI work is basically done but I uncovered some unexpected behavior in the REST API while testing. Unfortunately testing this change is very time consuming given the permutations (roughly 2^5... SCM provider, repo visibility, URL scheme, credential type, credential validity).

          James Dumay added a comment -

          Thanks for the update cliffmeyers - no rush

          James Dumay added a comment - Thanks for the update cliffmeyers - no rush

          Michael Neale added a comment - - edited

          Bumping this to critical now - as ssh credentials for git do not work at all - even if you put a private key in, it won't use it and instead tries to use system.  cc vivek

          Michael Neale added a comment - - edited Bumping this to critical now - as ssh credentials for git do not work at all - even if you put a private key in, it won't use it and instead tries to use system.  cc vivek

            cliffmeyers Cliff Meyers
            jamesdumay James Dumay
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: