DevOps best practices and cases

Just a couple of hours of work on a CI / CD system will help you save weeks of releases

Continuous Delivery and Continuous Integration (CI/CD) methods entered the industry with the advancement and popularization of DevOps. Before these methods were introduced, companies did not update their products very often: monthly, once a quarter, or even once a year. Thanks to modern practices, the release of new features can take place at least several times a day, and the user does not experience any inconvenience. It is also possible to make test releases and run A/B testing.

This is how the basic Pipeline on the project looks like
Continuous Integration. Each commit in the repository runs a build that runs linters and a bunch of tests to help determine if something has broken after changes have been made and if the code is good enough. The most common scenario is to check the code coverage with tests, build an application, and run various tests.
Continuous Delivery extends the previous step and automates the process of building and releasing it to the server or the application store. That's why we'll be able to release our application in a single click when we think it's needed. Also thanks to this approach to the release, you can quickly roll back to the previous version or see a list of people who had approved this release.
Continuous Deployment - Continuous Integration + Continuous Delivery.

What preparation steps do you need?

Before setting up CI/CD on a project, you need to prepare and make such steps:
  • use git and store your code on Github/Gitlab/Bitbucket
  • write tests for the code
  • add docker to your services (if possible)
  • choose the CI/CD framework

Let's take a closer look at the choice of the CI/CD framework for companies at different stages:


Startups: GitHub Actions, Travis CI, Circle CI
Middle/Late Stage: Jenkins, GitlabCi, Bamboo, TeamCity

For basic pipelines: GitHub Actions, Jenkins

TravisCI setup example for Github

1. Sign in to Github account
2. Go to travis-ci.com
3. We recommend logging in through your Github account.
4. In Travis CI, there is a search bar on the left side of the screen; click the + sign below it.

5. If you have connected your GitHub account, you should see a list of existing repositories that you can add.

6. Click the project you want and move the switch to the active position.

7.Click the setup button (indicated by the blue arrow above). We recommend you to read about each option in the Travis CI documentation and choose the most appropriate one. We will use the default settings.
8. Writing a config file:
Travis CI expects to find travis.yml in the root of the project, something like this:
language: node_js
node_js:
  - "8"
script:
  - echo 'Build starts!!'
  - echo 'Installing Deps!'
  - yarn
  - echo 'Testing!'
  - npm run test:prod

language - language of your project (list of supported)
node_js (or your language) - version
script: executed code (run tests, build artifacts)
If you have multiple languages in your projects you can use this solution.

This completes the setting when you push the new changes to start Travis. You can see information about the build results on the website.
To do this, select your Cloud from the list and follow the instructions.

To conclude, we want to say that software development is a complex task. Use the right tools to keep processes efficient and automate routine tasks. Even if you're not going to implement CI/CD right now, make it your priority to make it soon to save developers time and costs of downtime for off-the-shelf solutions that can make money in production without waiting to be manually or semi-automatically deployed.

If you can't choose a CI/CD solution or have another question about DevOps, you can contact us and we will help you to solve your problem.
Articles