Modern DevOps with Bitbucket Pipelines

Continuity in modern software development allows for frequent and consistent product release cycles guaranteeing your business ability to react to market changes whilst keeping your team productive.

In this session we’ll take a closer look at the guiding principles of continuous integration, continuous delivery and continuous deployment and highlight their key differences and their application using Bitbucket Pipelines.

image: node:10.15.0
pipelines:default:-step:script:- node -v

Overview of DevOps Culture

DevOps combines the operation tools and agile engineering practices to encourage collaboration between development and operations teams.

DevOps is driven by shared responsibility and increased collaboration between teams.

A development team that shares responsibility with the operations team can come up with simplified ways of managing deployments and monitoring production services for greater feedback.

The operations team can also work closely with the development team to understand the operational needs for a system and adoption of new tools.

DevOps culture blurs the lines between various teams, a common abuse of this culture is creating a DevOps Team .

Another core driving factor in DevOps is autonomy in teams. Developers and Ops team need to be able to make decisions and apply changes without having to go through a complex decision-making process.

At the core of DevOps is Automation. Automation removes chances of human error that may creep in during testing, configuration management and deployment scenarios.

DevOps pipeline

Continuous Deployment

Continuous Delivery

Continuous Integration

Review

Test

Staging

Deploy

Test

Review

Test

Staging

Deploy

Test

Build

Build

Continuous Integration

Continuous Integration advocates for automated building and testing before merge with the main branch. Depending on the branch work-flow, the code will have to be merged with the parent branch from which it was branched out of.

master, f8eef33

e96beb0

868c367

branch1, 4620a02

Continuous Delivery

Continuous Delivery leverages off of automated tests. In this scenario, the developer has a consistent pipeline to deploy their application as regularly as possible. It is always encouraged to regularly do small releases and monitor feedback for quicker troubleshooting. However, this practice normally requires human intervention.

Continuous Deployment

In Continuous Deployment, changes merged with the production branch are packaged and deployed without human intervention and in essence cutting release time from days to minutes.

CI/CD ServerVMBuild artifactbuildloop[ New Build ]CI/CD ServerVM

Bitbucket Pipelines

Bitbucket Pipelines is a CI/CD service that ships with Bitbucket that enables automated building, testing, and deployment from within Bitbucket.

The underlying magic is the usage of containers to build and package artifacts. We can use our own images to run builds. You can checkout out an overview of how building applications work
At the core Bitbucket Pipelines is bitbucket-pipelines.yml file. This is a configuration-as-code file that is versioned along with your code.

Let’s dive into the file itself and dissect the bits that facilitate build.

pull-requests : This executes build commands to be run on pull-request. Initially, the changes will be merged first before the PR pipeline starts. If merge fails, the pipeline will stop. Forks don’t trigger pipelines.