Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-2576

PAC: repository contains unrelated git repo

    XMLWordPrintable

Details

    • 3
    • False
    • None
    • False
    • Hide
      Now for Gitlab `tkn pac create repo` shows the default project repository and provide a way to user to give other project repository
      something like below
      $ tkn pac create repo

      ? Enter the Git repository url (default: https://gitlab.com/repositories/project):
      Show
      Now for Gitlab `tkn pac create repo` shows the default project repository and provide a way to user to give other project repository something like below $ tkn pac create repo ? Enter the Git repository url (default: https://gitlab.com/repositories/project):
    • Pipelines Sprint 227, Pipelines Sprint 228, Pipelines Sprint 229, Pipelines Sprint 230

    Description

      Expected behavior

      "tkn pac setup gitlab-webhook" asks for GitLab project ID and uses that git repo in Repository CR.

      Actual behavior

      When I run "tkn pac setup gitlab-webhook" from a directory with a cloned git repository, this repository will be used instead of the one provided in setup flow.

      Steps to reproduce

      1. git clone https://github.com/ppitonak/nocode
      2. cd nocode
      3. tkn pac setup gitlab-webhook

      ? Please enter the project ID for the repository you want to be configured : 66442
      ? Do you want me to use it? Yes
      ? Please enter the secret to configure the webhook for payload validation:  ****
      ℹ ️You now need to create a GitLab personal access token with `api` scope
      ℹ ️Go to this URL to generate one https://gitlab.com/-/profile/personal_access_tokens, see https://is.gd/rOEo9B for documentation 
      ? Please enter the GitLab access token:  ********************
      ? Please enter your GitLab API URL::  https://gitlab.cee.redhat.com/
      ✓ Webhook has been created on your repository
      ? Would you like me to create the Repository CR for your git repository? Yes
      ? Please enter the namespace where the pipeline should run (default: test): 
      ✓ Repository ppitonak-chains-tests has been created in test namespace
      🔑 Webhook Secret ppitonak-chains-tests has been created in the test namespace.
      🔑 Repository CR ppitonak-chains-tests has been updated with webhook secret in the test namespace
      

      Then check the repository CR - contains completely unrelated GitHub repository instead of the one from internal GitLab

      $ oc get repository
      NAME                    URL                                             SUCCEEDED   REASON   STARTTIME   COMPLETIONTIME
      ppitonak-nocode   https://github.com/ppitonak/nocode
      

      Attachments

        Issue Links

          Activity

            People

              sashture Savita .
              ppitonak Pavol Pitoňák
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: