1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/op-creating-webhooks.adoc
Preeti 518460c3fb pipelines in odc
assembly and flow changes

minor updates

images and start mods

review edits1

review edits 2

img edit

review edits 3

update title of app_pipeline flow

build fix

revert changes to file name

topic map changes

review edits 4

adding image tags

intro sentences
2020-06-05 14:00:45 +00:00

42 lines
1.6 KiB
Plaintext

// This module is included in the following assembly:
//
// *openshift_pipelines/creating-applications-with-cicd-pipelines.adoc
[id="creating-webhooks_{context}"]
= Creating Webhooks
_Webhooks_ are HTTP POST messages that are received by the EventListeners whenever a configured event occurs in your repository. The event payload is then mapped to TriggerBindings, and processed by TriggerTemplates. The TriggerTemplates eventually start one or more PipelineRuns, leading to the creation and deployment of Kubernetes resources.
In this section, you will configure a Webhook URL on your forked Git repositories `vote-ui` and `vote-api`. This URL points to the publicly accessible EventListener service route.
[NOTE]
====
Adding Webhooks requires administrative privileges to the repository. If you do not have administrative access to your repository, contact your system administrator for adding Webhooks.
====
[discrete]
.Procedure
. Get the Webhook URL:
+
----
$ echo "URL: $(oc get route el-vote-app --template='http://{{.spec.host}}')"
----
+
Note the URL obtained in the output.
. Configure Webhooks manually on the front-end repository:
.. Open the front-end Git repository `vote-ui` in your browser.
.. Click *Settings* -> *Webhooks* -> *Add Webhook*
.. On the *Webhooks/Add Webhook* page:
+
... Enter the Webhook URL from step 1 in *Payload URL* field
... Select *application/json* for the *Content type*
... Specify the secret in the *Secret* field
... Ensure that the *Just the push event* is selected
... Select *Active*
... Click *Add Webhook*
. Repeat step 2 for the back-end repository `vote-api`.