Traditionally, when a developer pushes code to a repository, manually triggering the build process, creating builds, and uploading artifacts to the host server can be time-consuming and repetitive. Continuous Deployment eliminates these bottlenecks by automating the entire deployment pipeline, triggering the deployment process automatically based on specific events in your Git repository.
With Kloudbean's CI/CD feature, this process becomes even more efficient and convenient. Once enabled, Kloudbean automatically deploys your application to the server whenever changes are detected in your codebase. This eliminates the need for manual interventions, saving time and reducing errors, allowing developers to focus on building features and improving the application.
In this knowledge base, we will walk you through the simple steps to enable CI/CD for your app hosted on Kloudbean, helping you streamline your deployment process and adopt a faster, more reliable workflow.
Step 1: Enabling CI/CD feature from Kloudbean console.
In order to enable CICD, make sure your git repo is connected, until then you won't be able to enable continuous deployment.
If you git repo is connected, scroll down to CICD deployment trigger section and turn On the toggle to enable this feature.

Once you enable it, there will following fields appear in this section.
- Webhook url: This is the webhook url you will have to add in respective code repository that you are using for your app (Github, Gitblab, Bitbucket).
- Secret Token: This is the token that will be used for authentication. You can renew token on demand basis, but if u renew then make to update it in your repo webhook settings as well, as kloudbean will authenticate webhook request on the basis of secret send.

Step 2: Adding Webhook on respective Git management platforms
Enabling CI/CD using webhook is a simple and easiest process where you will create a webhook on your repository and select the events where you want deployment to be triggered and deployed on production or staging environment. Adding webhook involving same steps on all Git repository management platform like Github, Gitlab and Bitbucket.
Enabling CICD on Github
In order to enable webhook in Github, consider following these steps;
Go to settings section in your desired repository which is connected in kloudbean app using deploy code with Git feature.

On left side, click on Webhooks tab, followed by Add webhook button.

After this, section will appear where you will add required webook information.
- Add webhook url in Payload URL field.
- Content type select application/json.
- In Secret field, add the secret token.
- Select the event type where you wished to trigger new deployment on kloudbean site for your respective app.
- Click on Add webhook button to save this webhook.

Once webhook is created, you can click on this webhook to manage or test it. and from the response section, you should be receiving response code 200. If any other response code received that mean webhook is not configured correctly, if you see 403 it mean your secret token is not being authenticated, consider updating webhook with correct Secret.

You can view webhook triggered detail and deployment detail that just initiated after adding webhook in from kloudbean console.

Enabling CICD on Gitlab
In order to enable webhook in Gitlab, consider following these steps;
Select you repository then click on Webhook tab in the left section. Followed by Add new webhook button.

After this adding new webhook section will appear, where you are going to add following webhook details.
Insert webhook url in URL field.

Insert Secret token in the Secret token field.
Select the events type on which you wish to trigger the deployment process.

SSL verification should b turn on in order to securely trigger deployment process.
Click on Add webhook button to save this newly created webhook.

Enabling CICD on Bitbucket
In order to enable webhook trigger on Bitbucket.
- Click on your code repository in Bitbucket.
- Go to the tab Repository settings.
- Once you are in repository settings, Click on Webhooks tab.

After this Add new webhook section will appear, where you are going to add following fields data from kloudbean CI/CD deployment trigger section.
- Add webhook name or title in Title section.
- Insert webhook in URL field. This url is unique for each app.
- Insert secret token in Secret field. This secret is important in order to authenticate legitimate request on kloudbean side, when webhook is triggered.
- From Status section, you have to keep status Active.

Scroll down to Triggers section where you will see all possible trigger points upon which you want your deployment to initiate. You can select desired event, in case of production trigger mostly set upon merge to main branch or after approval of merge. In this example i selected Push, Approved and Changes Request created event for demo purpose.

Once triggered are adjusted, just hit Save button to create and save this webhook.
Conclusion
Kloudbean streamlines your CI/CD pipeline, making deployment faster, simpler, and more reliable. With automated builds, tests, and seamless integration, your development cycle is optimized for efficiency and speed. Say goodbye to manual deployments and hello to a hassle-free process that ensures your application is always production-ready. Start using Kloudbean’s CI/CD feature today and accelerate your development workflow!
If you encounter any issues while setting up or managing your CI/CD pipeline on the Kloudbean platform, our expert DevOps support team is available 24/7 to assist you.