Friday, 4 March 2022

How to configure Webhooks for Pipeline(Terraform)

 Create a Pipeline in jenkins for your terraform automation

  • Go to Jenkins > New Items. Enter terraform-pipeline in name field > Choose Pipeline > Click OK


  • Select Configure after creation.
  • Go to Build Triggers and enable Trigger builds remotely.
  • Enter tf_token as Authentication Token

 









Now Save

Next 

Bitbucket Changes

    • Create a new Bitbucket Repo and call it terraform-pipeline
    • Go to Repository Settings after creation and select Webhooks
    • Click Add Webhooks
    • Enter tf_token as the Title
    • Copy and paste the url as shown below
              http://JENKINS_URL:8080/job/terraform-pipeline/buildWithParameters?token=tf_token
    • Status should be active
    • Click on skip certificate verification
    • triggers --> repository push
Now Whenever you push changes, to bitbucket , it will trigger the pipeline

No comments:

Post a Comment

Bash Script to Install Artifactory in Ubuntu 22

JFrog Artifactory OSS 7.21.5 — Install (Bash Script) This script installs Artifactory OSS (no Docker, no Pro, works on Ubuntu 22 EC2). ...