Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Multi-repo workflow #13

Open
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

Ranger-X
Copy link

multi-repo CI workflow differs from basic CI (which in templates) in the following key aspects:

  • In multi-repo workflow we can push to dev and prod registries separately with their own rules (see jobs/multi-repo and/or examples/multi-repo-module.gitlab-ci.yml for example jobs).
  • All werf's caches and other artifacts (from build stage) are stored in Gitlab's module's registry by default. And only final images are pushed to the dev/prod registries. So, even in dev-registry there should be no "build-time garbage" and/or some "extra" images/layers for each module.

Ranger-X added 12 commits March 25, 2025 17:21
… will execute only when requested by some job

Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
…w does not work when included via `remote` keyword :-(

Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
MODULES_MODULE_TAG: pr${CI_MERGE_REQUEST_IID}
rules:
# do not run if some required variables is empty
- if: '$DEV_MODULES_REGISTRY == null || $DEV_MODULES_REGISTRY == "" || $DEV_MODULES_REGISTRY_PATH == null || $DEV_MODULES_REGISTRY_PATH == ""'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only, when and rules don't work well together. If we implement rules, then it's better to get rid of when without rules in the job and only in these jobs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In multi-repo templates (templates/multi-repo/*.yml) I use rules everywhere. Do you mean get rid of only in simple templates (templates/*.yml)?


.setup:
before_script:
# Setup trdl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#in gitlab-ci it is better to use docker-executor, separately prepare the image and call it. this will reduce the busy time of runners, add isolation between jobs, reduce the number of used dependencies (possible points of failure) and increase security. but perhaps they will not agree with me

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree about a separate image for docker/kubernetes-executor.
But minor/patch versions of Werf/DMT come out quite often and maintaining a separate CI-image can be "more expensive" in terms of time than installing current versions of tools every time pipeline is launched. 😇

I can also be wrong with my conclusions. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants