Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement release process using Golang #275

Open
pablochacin opened this issue Aug 3, 2023 · 1 comment
Open

Implement release process using Golang #275

pablochacin opened this issue Aug 3, 2023 · 1 comment
Labels
ci/cd design proposal Requires a design document for discussion internal improvement improves code quality or organization

Comments

@pablochacin
Copy link
Collaborator

Presently the logic of the build process is split between the CI automation (gitlab pipeline) and a series of shell scripts. This logic is complex and involves building binaries for multiple targets, as well as building and publishing docker images for the main branch and for release branches.

Besides, a simpler version of this build logic is also duplicated in a Makefile created and maintained for the convenience of the developers. A Makefile is used to ensure some dependencies are maintained.

The current situation has multiple disadvantages:

  • Logis is hard to understand as it is scattered into multiple components
  • Impossibility of testing the release process locally
  • Logic is hard to debug as neither shell scripts nor ci pipelines provide tools for debugging
  • Some level of logic duplication with corresponding inconsistencies

One alternative to this situation could be adopting a pipeline-as-code approach using Golang as the programming language. Using a "regular" programming language has many advantages.

  • Use of regular development tools such as IDE
  • Makes it easier to reuse logic
  • Facilitates developing tests
  • Allows running the same process regardless of the environment (local or ci pipelines)

Some tools to consider are

  • dagger
  • script package offers go functions similar to (but not 100% compatible with) many shell functionalities (e.g. pipes between commands) and common command (e.g sed, cut)
  • gorun tool that allows running scripts in go without previous compilation
@pablochacin pablochacin added design proposal Requires a design document for discussion ci/cd internal improvement improves code quality or organization labels Aug 3, 2023
@roobre
Copy link
Collaborator

roobre commented Aug 3, 2023

There's also https://github.com/magefile/mage, which has been around since 2018. I haven't used it personally but it's been around for a very long while so I'd expect some level of maturity as a result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd design proposal Requires a design document for discussion internal improvement improves code quality or organization
Projects
None yet
Development

No branches or pull requests

2 participants