How Bitbucket, Bitbucket Pipelines, Git and Webhooks can be used to simplify and optimize the automated deployment process.
Due to the fast pace of today's world, agility has become central in software engineering. Software must be able to adapt to circumstances and evolve. It is therefore necessary to automate internal processes for the provision of software as far as possible. Especially software distribution, the so-called deployments, lend themselves strongly to this. We will explain how our automatic deployment works and which tools we use for it.
What are automatic deployments?
Deployment refers to the distribution or provision of software. This process can be semi- or fully automated. Fully automated deployments can eliminate the manual effort involved in deployment.
A "traditional" deployment includes the following steps:
- Assembling the release
- Preparing the release with all necessary configurations
- Build process and running automated tests
- Importing into the acceptance system
- User tests / acceptance
- Distributing the software in the production system
In an automatic deployment, all those steps that do not require manual interaction are performed automatically. The deployment itself is then fully automated, so a release is deployed to a platform without any manual work. This process can be carried out directly by a developer without the need for another expert. Thus, new features or entire platforms can be quickly and easily moved from one environment (e.g. staging to production) to another.
Continuous Integration, Continuous Delivery and Continuous Deployment describe the automated process from the creation of the code, through testing and merging, to deployment in the repository and deployment to production.
Automated deployments at cloudtec
To perform a deployment, changes to the code must be present. These changes can be new files or new/changed lines within existing files or database adjustments. Typically, a developer develops a new feature or change in their own development environment. Any customization or enhancement to the code must go through the automated tests before the latest version can be released.
The changes created are summarized and made available in a so-called "commit". Once a commit is created, it must be pushed to a branch in the repository. This triggers the process for testing the new code. The commit ends up in a pipeline. A pipeline is a running software environment that triggers multiple testing processes in parallel. Thus, two types of automated tests are performed in the cloudtec environment: behavior-based tests (behat tests) and functional tests (unit tests). Behavior-based tests simulate the interaction of a user with the software. Functional tests, on the other hand, check whether a software part works correctly and whether the code is correct.
After a commit has successfully passed the tests in the pipeline, a pull request can be created for the changes. This pull request must then be checked and approved by a second developer. After that, the change of the commit can be merged into the branch of the software. This merging of the code automatically triggers a deployment to the appropriate environment. Deployment interrupts access to a system (e.g. a website or customer portal) for a short period of time. During this time, the updated source code and data are automatically exchanged on the target branch, thus publishing the latest version of the code.
To make the automatic deployment work, the following tools are used:
- Git for managing the versions of the code
- Bitbucket is used to manage the source code, repositories, commits, branches and pull requests
- Bitbucket Pipelines is used to run different test processes automatically and in parallel
Advantages of automatic deployments
Automatic deployments bring many advantages. We at cloudtec could see the following advantages:
- More stability due to regular execution of the process
- Less overload of the development team
- Lower costs due to reduced manual effort
- Faster deployments due to standardization
- Less manual work = less errors
Are you looking for a partner to build you a platform with continuous software delivery?
We are the right partner for you! With our automated deployment process, we can guarantee you regular and stable software deliveries. By standardizing our process, we fully focus on your individual needs and challenges right from the start. We are therefore more efficient and you get a high quality product for your budget.
Are you interested in a new online platform or a customer portal? Then use our contact form and explain your project to us. We will design a flexible solution for you based on our platform stack and our automated deployment process.