Skip to content

Latest commit

 

History

History
53 lines (42 loc) · 2.02 KB

deploy-ocp-pipeline.md

File metadata and controls

53 lines (42 loc) · 2.02 KB

Deploy Using OpenShift Pipeline

We assume that you are in the folder that you have clone/fork the code. For instructions on how to install OpenShift Pipiline you can refer to my OpenShift Pipeline Demo in this section

  1. Login to you cluster using the CLI

  2. Make sure you are in the pipeline-demo folder .../pipeline-demo/

  3. Using Kustomize create the different resources needed to run the demo

    oc apply -k .
    

    Result:

    namespace/pipeline-demo created
    service/simple-quarkus-service created
    deployment.apps/simple-quarkus-service created
    route.route.openshift.io/simple-quarkus-service created
    pipeline.tekton.dev/simple-quarkus-service created
    eventlistener.triggers.tekton.dev/github-webhook created
    triggerbinding.triggers.tekton.dev/github-pr-trigger-binding created
    triggertemplate.triggers.tekton.dev/simple-quarkus-service-trigger-template created
    persistentvolumeclaim/maven-repo-pvc created
    persistentvolumeclaim/sources-pvc created
    
  4. Let's expose the trigger service

    oc expose svc el-github-webhook -n pipeline-demo
    
    oc get route el-github-webhook -n pipeline-demo
    
  5. Retrive the trigger url.

    echo "$(oc  get route el-github-webhook -n pipeline-demo  --template='http://{{.spec.host}}')"
    
  6. Create the GitHub Webhook

    Open GitHub in the right repository, go to setting -> Webhook -> Add Webhook

    Before you click Add webhook it should look similar to this. With the URL retrieve step 5.

    Webhook

    You can now push a change to the repository, it should trigger the pipeline.

  7. Open OpenShift console and validate the the pipeline is running.

🎉 CONGRATULATIONS

You have now deploy the service using OpenShift Pipeline.

👉 Return: Reposotory content