DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Deploy Smarter, Not Harder: A Guide to Setting Up AWS CI/CD Pipelines for ECS
  • Jenkins in the Age of Kubernetes: Strengths, Weaknesses, and Its Future in CI/CD
  • DORA Metrics: Tracking and Observability With Jenkins, Prometheus, and Observe
  • An Explanation of Jenkins Architecture

Trending

  • SaaS in an Enterprise - An Implementation Roadmap
  • Software Delivery at Scale: Centralized Jenkins Pipeline for Optimal Efficiency
  • Creating a Web Project: Caching for Performance Optimization
  • Go 1.24+ Native FIPS Support for Easier Compliance
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Configure Bitbucket Webhook to Trigger Jenkins Builds on AWS EC2

Configure Bitbucket Webhook to Trigger Jenkins Builds on AWS EC2

In this tutorial, learn how to trigger Jenkins builds on an AWS EC2 machine with each code commit in your BitBucket repository.

By 
Ajitesh Kumar user avatar
Ajitesh Kumar
·
Aug. 04, 17 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
19.0K Views

Join the DZone community and get the full member experience.

Join For Free

This article represents the steps required to configure BitBucket Webhooks to trigger Jenkins Builds on AWS EC2 based on code committed in the repository. This essentially means that a code commit in the BitBucket code repository would trigger a build on the Jenkins server running on a AWS EC2 machine. This forms the starting point of a continuous delivery pipeline. The Jenkins build, when triggered as a result of code push, could perform tasks such as some of the following:

  • Run the build.
  • Run tests.
  • Publish build artifacts in artifactory.
  • Deploy the build artifacts in different environments including QA, UAT, and production.

Please feel free to comment/suggest if I missed one or more important points.

Following are the steps which need to be taken to configure the push-based trigger of a Jenkins build:

  • Configure Inbound Rule on Jenkins Server on AWS EC2: One needs to add the inbound rule on the Jenkins box on AWS EC2 to follow this IP: 104.192.143.192/28. This is required to allow requests coming from BitBucket to reach the Jenkins server on AWS EC2. This is the BitBucket cloud IP outbound address (for hooks like POST), while the inbound IP address for BitBucket is 104.192.143.1. The IP (104.192.143.1) can be figured out by pinging bitbucket.org. The outbound IP address can be found on this page.
  • Configure Webhook in BitBucket: One needs to add the following URL while creating the WebHook in BitBucket: http://jenkins_server_uri/bitbucket-hook/.
  • Configure SCM in Jenkins Project: He next step is to configure Git as a source code management tool within the Jenkins project by clicking on the Configure link on the project’s dashboard. Following is a sample of input parameters:
    • Repository_URL: https://<bitbucket_user>@bitbucket.org/<bitbucket_user>/<bitbucket_project_name>.git
    • Credentials: Create a credential by providing a BitBucket username and password.
  • Setup Build Triggers in Jenkins Project: Finally, one would need to setup build triggers for the Jenkins project by clicking on the Configure link on project’s dashboard. Check the option “Build when a change is pushed to BitBucket.”
AWS Continuous Integration/Deployment Jenkins (software) Webhook

Published at DZone with permission of Ajitesh Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Deploy Smarter, Not Harder: A Guide to Setting Up AWS CI/CD Pipelines for ECS
  • Jenkins in the Age of Kubernetes: Strengths, Weaknesses, and Its Future in CI/CD
  • DORA Metrics: Tracking and Observability With Jenkins, Prometheus, and Observe
  • An Explanation of Jenkins Architecture

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!