-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: agent version used in build so gha properly evaluates env var #201
Conversation
Co-authored-by: Robb Kidd <[email protected]>
Co-authored-by: Robb Kidd <[email protected]>
if this somehow still doesnt work with i_made_this_up... (╯°□°)╯︵ ┻━┻ Co-authored-by: Robb Kidd <[email protected]>
- take shell and git out of the equation - make version uses variable with hardcoded string - make build uses hardcoded string Co-authored-by: Robb Kidd <[email protected]>
Adds RELEASE_VERISON as an optional build argument to the Dockerfile. RELEASE_VERSION is still computed by the Makefile. For the docker-build make target, pass in the version with --build-arg. For the docker/build-and-publish GitHub Action in our Release workflow, compute the RELEASE_VERSION with our make version target, set it in the environment for the workflow per GitHub docs[1], and pass in the arg with the build-args: key for the action. [1] https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files
even though it breaks my heart Co-authored-by: JamieDanielson <[email protected]>
## Which problem is this PR solving? - Reverts #186 - Reverts #187 ## Short description of the changes As seen in #192 (and attempted to fix in #201), GitHub Actions checkout action doesn't include git tag history, so computing current version from tags doesn't work at the moment. We are temporarily reverting this to expedite a new release using hardcoded version values, and will revisit this later. ## How to verify that this has the expected result `honeycomb.agent_version` shows the `vX.Y.Z` version in use, in agent container logs and telemetry. --------- Co-authored-by: Robb Kidd <[email protected]>
push: false | ||
platforms: linux/amd64 | ||
# platforms: linux/amd64,linux/arm64 - don't build arm64 on PRs for now | ||
cache-from: type=gha |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This disables docker layer caching between builds - does this prevent git tags being detected correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this doesn't seem to be related to our issue. Was just trying different settings to try to determine why the tag wasn't rendering as expected. I've set this PR back to draft as we'll be putting it down for now after removing the build interpreting version in #206
I'm going to close this PR because it's a bit distracting right now as an open PR; the issue is still open and this can be picked back up when it makes sense to do so. |
Which problem is this PR solving?
Short description of the changes
RELEASE_VERSION
variable toREL_VERSION
in case it's being used already in GHA workflow somewhere.How to verify that this has the expected result
Review the output in the action for docker-build on the PR. Search for "ldflags" and confirm the
"-X main.Version=ca4d958"
instead shows"-X main.Version=v0.0.14-alpha-6-gca4d958"
instead ofca4d958
.(It should be v0.0.15-alpha but the previous tag was not annotated)