* This Cloud functions will be triggered based on pubsub message , it reads and get intendID from the message and check GCP firestore if intendId exist or not
* if IntendId exist in Datastore then fetch pipeline details from it and trigger paramertized jenkin job
# Block diagram of the Flow
# Deployment steps:
## Create a Jenkin Job and User API token:
* Create a paramertized Jenkin Job
* Create and API token for the user authentication that is required to trigger jenkins job
* Trigger Build remotely check box must checked at the pip;eine configuration and a token must spcified there
## Setting up a Pub/Sub topic:
* Specify your Google Cloud project in an environment variable.
export PROJECT_ID=PROJECT_ID
* Specify your Google Cloud organization in an environment variable.
export ORG_ID=ORG_ID
* Set the project ID for gcloud commands.
gcloud config set project PROJECT_ID
* Create the Pub/Sub topic where notifications are published.
In this section, you deploy a function that sends notifications to your email account.
* Ensure that you're using the same PROJECT_ID you used to create the Pub/Sub topic.
* Click Create Function. SendGrid function
* Set Function name to send-high-and-critical-finding-email-notification and the Trigger type to Pub/Sub.
* Select the Pub/Sub topic that you created in Setting up a Pub/Sub topic.
* Click Save, and then click Next.
* On the next page, set Runtime to Python 3.10.
* In the file list, click requirements.txt and add the following to the text field: sendgrid.[Text Wrapping Break][Text Wrapping Break]SendGrid requirements
* Click main.py and replace the contents with your code snippet.
* Navigate to the Entry point field and enter the name of the function in the code snippet (send_email_notification, in this example).
* Click Deploy. You are returned to the Cloud Functions list where you should see your new function. When a green check mark appears next to the function name, it has been successfully deployed. The process could take a few minutes.