Skip to content

CI/CD

GitLab CI (.gitlab-ci.yml) builds, tests and deploys. Test jobs run on the docker runner, image builds on the shell runner.

Stage Jobs
test go (gofmt, vet, tests with PostgreSQL), web (check and build of the SPA), helm (lint), docs-lint, docs-build
build binary, print-agent (linux amd64/arm64 artifacts)
e2e e2e (Cypress against the binary)
release docker-image, docs-image, chart (tags), po (master pushes)
deploy deploy-staging, deploy-production, docs-deploy-staging, docs-deploy-production

Deployments

Trigger App Documentation
push to master app.staging.targetlog.ch docs.staging.targetlog.ch
tag vX.Y.Z staging, then app.targetlog.ch staging, then docs.targetlog.ch

Production deploys only after the staging deploy of the same tag succeeded. The app is deployed with helm upgrade --install targetlog-app helmchart -f deploy/<env>.yaml, the documentation with the shared chart helm/static-website and docs/deploy/<env>.yaml. KUBECONFIG is a file variable per GitLab environment.

The image version is git describe --tags --always (e.g. v0.3.0 or v0.3.0-2-g1a2b3c4); the sidebar of the app shows it.

The po job

Runs make i18n on every push to master and pushes changed catalogs with -o ci.skip, using the project access token in I18N_PUSH_TOKEN. It may fail (allow_failure), e.g. when master moved meanwhile.