IBM / cp4i-deployment-samples

Samples for deploying Cloud Pak for Integration capabilities in a pipeline
Apache License 2.0
22 stars 94 forks source link

Adding in the new syntax to trigger Event Listener #220

Closed prattyushmangal closed 3 years ago

prattyushmangal commented 3 years ago

Description of Change

Latest Version of OCP Pipelines require the Event Listener call to be a POST with a Body and so the curl call in the test-ddd script needed updating in line with syntax referenced at https://github.com/IBM/cp4i-deployment-samples/blob/2021.3.1/DrivewayDentDeletion/Operators/cicd-apply-dev-pipeline.sh#L228

Verification of Change

prattyushmangal commented 3 years ago

Tested that implementation without escapes:

> oc get route el-main-trigger-route --template='http://{{.spec.host}}' 
http://el-main-trigger-route-cp4i.<endpoint>-0000.us-south.containers.appdomain.cloud%   

> prattyushmangal@Prattyushs-MBP Operators %   curl -X POST http://el-main-trigger-route-cp4i.<endpoint>-0000.us-south.containers.appdomain.cloud --header "Content-Type: application/json" --data '{"message":"Test run"}' 

{"eventListener":"test-apic-event-listener","namespace":"cp4i","eventID":"3b6debd5-0773-4e46-a1b7-f54dbc19bee3"}

And with that I can see the Pipeline Get triggered