Below you will find pages that utilize the taxonomy term “CI/CD”
Posts
read more
Wrangling Gitlab CI/CD in Monorepos
Photo by Kelly Sikkema on Unsplash
So, I recently had the opportunity to extensively dig into Gitlab’s CI/CD. We have a monorepo that I wanted to deploy automatically, and it took quite a bit of work to optimize it and work as I expected.
To set the stage, here’s our core .gitlab-ci.yml
file (now):
image: node:18-alpine3.19
variables:
AWS_REGION: us-east-1
AWS_DEFAULT_REGION: us-east-1
FF_USE_FASTZIP: "true"
ARTIFACT_COMPRESSION_LEVEL: "fast"
CACHE_COMPRESSION_LEVEL: "fast"
stages:
- prepare
- module-caches
- layers
- build
- deploy
#******************************************************************
include:
- local: ".gitlab/cache-ci.yml"
- local: ".gitlab/rules-ci.yml"
- local: ".gitlab/build-ci.yml"
- local: ".gitlab/deploy-ci.yml"
- local: "apps/landing/.gitlab-cache-ci.yml"
- local: "apps/landing/.gitlab-ci.yml"
- local: "apps/quickbooks-connector/.gitlab-ci.yml"
- local: "apps/reviews/reviews-api/.gitlab-cache-ci.yml"
- local: "apps/reviews/reviews-api/.gitlab-ci.yml"
- local: "apps/reviews/reviews-ui/.gitlab-cache-ci.yml"
- local: "apps/reviews/reviews-ui/.gitlab-ci.yml"
- local: "apps/stocks/stocks-api/.gitlab-cache-ci.yml"
- local: "apps/stocks/stocks-api/.gitlab-ci.yml"
- local: "apps/stocks/stocks-ui/.gitlab-cache-ci.yml"
- local: "apps/stocks/stocks-ui/.gitlab-ci.yml"
- local: "apps/tnb/tnb-api/.gitlab-cache-ci.yml"
- local: "apps/tnb/tnb-api/.gitlab-ci.yml"
- local: "apps/tnb/tnb-ui/.gitlab-cache-ci.yml"
- local: "apps/tnb/tnb-ui/.gitlab-ci.yml"
- local: "packages/pinnacle-layer/.gitlab-cache-ci.yml"
- local: "packages/pinnacle-layer/.gitlab-ci.yml"
# variables:
# CI_DEBUG_TRACE: true
#******************************************************************
always:
stage: prepare
script:
- env | sort
Here are some of the things that drove me crazy: