L
L
leonidpetrosian2022-01-29 18:50:30
Docker
leonidpetrosian, 2022-01-29 18:50:30

Is Multistage build Docker images a replacement for CI Pipeline?

The standard pipeline of any project looks something like this:
build -> lint -> test -> doсker -> deploy
With multistage builds, we can perform most of the steps when building the Docker image by writing them in the Dockerfile. Then what form does the CI pipeline take?
docker -> deploy?
How representative is this?
When is the best time to use each approach?
What is " Best Practices "?
Also, what are you using on the project?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vitaly Karasik, 2022-01-29
@vitaly_il1

build doesn't include everything - there are different kinds of tests (from unit to end-to-end), static code scanner, etc.
So CI/CD is not limited to docker build.

M
Michael, 2022-01-29
@Akela_wolf

Here the main idea is to get as much feedback as possible from each stage Let
's say our build broke down - we should find out about it as early as possible and with all the details: where, how and why it broke.
Similar to lint - where, how and why our code guideline is broken.
Similarly, test - which test failed and how exactly.
If build docker gives you the same accurate diagnosis of where, what and how broke - in fact, why not? But personally, I would divide it into separate steps, according to the unix way principle. This will make it easier to manage everything.

V
Vadim, 2022-01-29
@Viji

do not forget about security tests - besides, Step Gates are often installed in CI / CD - for example, to display a warning when the code coverage of unit tests is low or there are a large number of vulnerabilities in packages. Often third-party scanners are used for this, which provide integration with JIRA or other design software. In docker, this is not always possible or difficult - and often slow too!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question