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

Set app/version at build time for tagged releases #2097

Closed
2 tasks done
corverroos opened this issue Apr 13, 2023 · 0 comments
Closed
2 tasks done

Set app/version at build time for tagged releases #2097

corverroos opened this issue Apr 13, 2023 · 0 comments
Assignees
Labels
cicd protocol Protocol Team tickets

Comments

@corverroos
Copy link
Contributor

corverroos commented Apr 13, 2023

🎯 Problem to be solved

See the release v2 design doc. We need to set the app.version to the value of the git tag (and docker image tag) for official tagged releases.

🛠️ Proposed solution

  • Approved design doc: link
  • Core team consensus on the proposed solution

We cannot just tag an existing image anymore when publishing a tagged release. Instead we need to build a new image and set the app/version dynamically at build time using:

go build -ldflags "-X github.com/obolnetwork/charon/app/version.Version=${GIT_TAG} ..."

So we should:

  • Refactor charon Dockerfile to support optional app version overrides using env vars
  • Refactor build-push-deploy action to set the env var accordingly when triggered by a tag event
@github-actions github-actions bot added the protocol Protocol Team tickets label Apr 13, 2023
@corverroos corverroos self-assigned this May 24, 2023
obol-bulldozer bot pushed a commit that referenced this issue May 24, 2023
Sets the app/version.Version variable to the git tag when building tagged docker images. 

category: misc
ticket: #2097
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cicd protocol Protocol Team tickets
Projects
None yet
Development

No branches or pull requests

1 participant