Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.7 KB

ci-cd.md

File metadata and controls

41 lines (30 loc) · 1.7 KB

Continuous Integration and Deployment

Work in progress

Workflow Concept

  • for PRs, we run tests (duh)
  • for pushes to master (i.e. merged PRs), or pushes of tags:
    • also run tests
    • build all docker images and push them to the GitHub package registry
  • when new Docker images are published, re-deploy
    • we could either poll for them (watchtower can do that)
    • or we somehow notify the deployment server that new images are published (e.g. making a simple to request to some HTTP API)

TODO

  • build & publish nginx image
  • build & publish frontend image
  • create a docker-compose config that uses images from GitHub registry
  • make sure pulling from GH reg. works (needs auth via token, see below); try to automate with a small script

Notes / Resources

GitHub Documentation

Pulling Docker Images from GitHub Registry

To be able to pull Docker images from the GitHub registry, you need an access token.

  • create token, give it package:read permission
  • store somewhere (e.g. ~/.wartefrei.token)
  • cat ~/.wartefrei.token | docker login docker.pkg.github.com -u USERNAME --password-stdin
  • docker pull docker.pkg.github.com/methodpark/digitaleswarten/wartefrei-backend:latest