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
-
Login to you cluster using the CLI
-
Make sure you are in the pipeline-demo folder
.../pipeline-demo/
-
Using
Kustomize
create the different resources needed to run the demooc 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
-
Let's expose the trigger service
oc expose svc el-github-webhook -n pipeline-demo
oc get route el-github-webhook -n pipeline-demo
-
Retrive the trigger url.
echo "$(oc get route el-github-webhook -n pipeline-demo --template='http://{{.spec.host}}')"
-
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.
You can now push a change to the repository, it should trigger the pipeline.
-
Open OpenShift console and validate the the pipeline is running.
🎉 CONGRATULATIONS
You have now deploy the service using OpenShift Pipeline.
👉 Return: Reposotory content