Skip to main content

Concern

Continuous integration and automated pipelines.

Technology

GitLab CI

Documentation

Implementation

The boilerplate includes .gitlab-ci.yml with a deploy job that targets Digital Ocean App Platform. The job substitutes shell variables (e.g. SOURCE_DIR, GITLAB_REPO, GITLAB_BRANCH, DO_DB_CLUSTER_NAME) into the app spec using envsubst, then runs doctl apps update to apply the spec. To use it, create the app once (e.g. with doctl apps create after envsubst) and store the app ID; create the Managed Database cluster(s) in DigitalOcean and note the cluster name(s). Set DO_ACCESS_TOKEN, DO_APP_ID (or per-environment app IDs), and DO_DB_CLUSTER_NAME (per environment when using production DBs) as GitLab CI/CD variables so the job can authenticate, update the right app, and bind to the right DB cluster. The pipeline does not include format or test jobs by default; those can be added when the project adopts them.