This project is a playful demonstration of a Golang application, showcasing various development approaches:
- Simplified GitFlow: Implements a basic GitFlow with separate development (dev) and production (prod) releases. Note that it doesn't fully automate Continuous Integration (CI) for release branches.
- Automatic Version Bumping: Utilizes the conventional commits specification for automatic version incrementation.
- GoLang CI Linting: Integrates GoLang CI lint to support multiple linting tools available for Go applications.
- Container Image Releases: Generates container images for both pre-release (development environments) and production environments.
- Go Application Release: Utilizes GoReleaser to create a GitHub release, marking a version milestone.
- Configuration Code Separation: Centralizes configuration in a separate repository, facilitating GitOps CD tools. Updated values enable automated deployment through GitOps Continuous Delivery (CD) processes.
The workflow is as follows:
- Pull Request (PR): Executes configured lints during a PR.
- PR Merge into Dev Branch: Creates a pre-release semver tag (e.g.,
0.1.5-dev.2
). Pushes a container image with the corresponding tag to the Harbor container registry. Updates version values in the values repository for specified applications. - Development PR (against a development branch): Labeled as
release: pending
. Offers a convenient helper for creating a release PR into the production branch (main). - Release PR: Runs all lints again. Once approved and merged, GoReleaser creates a GitHub release. Subsequently, the release container image is pushed into the container registry, and prod version values are updated.