Answer the question
In order to leave comments, you need to log in
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
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.
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.
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 questionAsk a Question
731 491 924 answers to any question