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

Use the same token to fetch remote task from the same host on Github with non-default branch

XMLWordPrintable

    • 3
    • False
    • None
    • False
    • Use the same token to fetch remote task from the same host on Github with non-default branch
    • Pipelines Sprint 231

      Story (Required)

      As a <PERSONA> trying to <ACTION> I want <THIS OUTCOME>

      <Describes high level purpose and goal for this story. Answers the questions: Who is impacted, what is it and why do we need it? How does it improve the customer’s experience?>

      Background (Required)

      <Describes the context or background related to this story>

      Out of scope

      <Defines what is not included in this story>

      Approach (Required)

      <Description of the general technical path on how to achieve the goal of the story. Include details like json schema, class definitions>

      Dependencies

      <Describes what this story depends on. Dependent Stories and EPICs should be linked to the story.>

      Acceptance Criteria (Mandatory)

      <Describe edge cases to consider when implementing the story and defining tests>

      <Provides a required and minimum list of acceptance tests for this story. More is expected as the engineer implements this story>

      INVEST Checklist

      Dependencies identified

      Blockers noted and expected delivery timelines set

      Design is implementable

      Acceptance criteria agreed upon

      Steps to reproduce

      Steps to reproduce

      1. install Pipelines operator, update config map pipelines-as-code in namespace openshift-pipelines:

      secret-github-app-scope-extra-repos: pitonak-x/topsecret
      secret-github-app-token-scoped: "true"
      

      and remove PAC controller pod, wait until pod is recreated
      2. bootstrap PAC

      $ tkn pac bootstrap
      🏃 Checking if Pipelines as Code is installed.
      👌 Pipelines as Code is already installed.
      ? Enter the name of your GitHub application:  pactestpp2
      👀 I have detected an OpenShift Route on: https://pipelines-as-code-controller-openshift-pipelines.apps.pparm120111d17.aws.ospqa.com
      ? Do you want me to use it? Yes
      🌍 Starting a web browser on http://localhost:8080, click on the button to create your GitHub APP
      🔑 Secret pipelines-as-code-secret has been created in the openshift-pipelines namespace
      🚀 You can now add your newly created application on your repository by going to this URL:
      
      https://github.com/apps/pactestpp2
      
      💡 Don't forget to run the "tkn pac create repo" to create a new Repository CRD on your cluster.
      ⚠ your controller route is using a self signed certificate
      ⚠ make sure you allow to connect to self signed url in your github app setting.
      

      3. add the github app to the two repositories in github org (pitonak-x in this case, one public repo with "production code", another one private with a task)
      4. disabled tls in webhook in github app settings
      5. created repo CRD

      $ tkn pac create repo
      ? Enter the Git repository url (default: https://gitlab.cee.redhat.com/ppitonak/pactest):  https://github.com/pitonak-x/pactest
      ? Please enter the namespace where the pipeline should run (default: pactest-pipelines5): pactest2
      ✓ Repository pitonak-x-pactest has been created in pactest2 namespace
      ℹ There is already a file named: .tekton/pipelinerun.yaml, skipping template generation, feel free to use "tkn pac generate" command to generate sample template.
      

      6. clone "pactest" repository and created a PR

      -    pipelinesascode.tekton.dev/task: "git-clone"
      +    pipelinesascode.tekton.dev/task: "https://github.com/pitonak-x/topsecret/blob/pactest/git-clone.yaml"
      

      7. verify that a pipeline run was created and finished successfully in both command line and pull request page

      Story estimated

      Legend

      Unknown

      Verified

      Unsatisfied

      Done Checklist

      • Code is completed, reviewed, documented and checked in
      • Unit and integration test automation have been delivered and running cleanly in continuous integration/staging/canary environment
      • Continuous Delivery pipeline(s) is able to proceed with new code included
      • Customer facing documentation, API docs etc. are produced/updated, reviewed and published
      • Acceptance criteria are met

            cboudjna@redhat.com Chmouel Boudjnah
            ppitonak Pavol Pitoňák
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: