Answer the question
In order to leave comments, you need to log in
Gitlab CI building two applications with common stages and dependencies that do not slow down each other?
Hi all.
There is a monorepo with an angular project - a monorepo is when several products are developed in one repository.
When a release comes out, you need to build 2 applications at the moment - npm install, ng build, docker build for each
There is a gitlab-ci.yml file and two phases: buildng and builddocker (actually more, but it doesn’t matter here)
in the first a couple of file manipulations take place and the application is built (ng build)
in the second, the docker image is built and pushed.
since there are two applications, there are also two “jobs” for each phase:
stages:
- buildng
- builddocker
buildng_app1:
stage: buildng
allow_failure: false
...
script:
- do the job for app1
buildng_app2:
stage: buildng
allow_failure: false
...
script:
- do the job for app2
builddocker_app1:
stage: builddocker
allow_failure: false
dependencies:
- buildng_app1
...
script:
- do the job for app1
builddocker_app2:
stage: builddocker
allow_failure: false
dependencies:
- buildng_app2
...
script:
- do the job for app2
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question