Skip to content

Conversation

wallrj-cyberark
Copy link
Member

@wallrj-cyberark wallrj-cyberark commented Oct 16, 2025

  • Add gomodule_name and use it for ldflags and golangci-lint config
  • Update makefiles to reference gomodule_name instead of repo_name
  • Add TODO in go.mod to track renaming the Go module to match repo

Fixes: https://venafi.atlassian.net/browse/VC-45997

Testing

$ docker run --rm ghcr.io/wallrj-cyberark/disco-agent:v1.7.0-alpha.2-4-g7f81168adaffcd agent
Unable to find image 'ghcr.io/wallrj-cyberark/disco-agent:v1.7.0-alpha.2-4-g7f81168adaffcd' locally
v1.7.0-alpha.2-4-g7f81168adaffcd: Pulling from wallrj-cyberark/disco-agent
d91610939618: Pull complete
250c06f7c38e: Pull complete
76663a841f2d: Pull complete
878f28eb7868: Pull complete
Digest: sha256:be4efa5472cf93a2d98dd96c56446d5c38c4e404e93232d999e1cda2785280c5
Status: Downloaded newer image for ghcr.io/wallrj-cyberark/disco-agent:v1.7.0-alpha.2-4-g7f81168adaffcd
I1016 06:36:11.508930       1 run.go:58] "Starting" logger="Run" version="v1.7.0-alpha.2-4-g7f81168adaffcd" commit="7f81168adaffcdb45e1a5a69b9d8ed84fb26f26c"
E1016 06:36:11.509801       1 root.go:53] "Exiting due to error" err="Failed to load config file for agent from: ./agent.yaml" exit-code=1```

- Add gomodule_name and use it for ldflags and golangci-lint config
- Update makefiles to reference gomodule_name instead of repo_name
- Add TODO in go.mod to track renaming the Go module to match repo

Signed-off-by: Richard Wall <richard.wall@cyberark.com>
@wallrj-cyberark wallrj-cyberark changed the title Use gomodule_name to handle go module/repo mismatch [VC-45997] Use gomodule_name to handle go module/repo mismatch Oct 16, 2025
@wallrj-cyberark wallrj-cyberark changed the title [VC-45997] Use gomodule_name to handle go module/repo mismatch [VC-45997] Fix agent version by adding gomodule_name to handle go module / repo mismatch Oct 16, 2025
-X $(repo_name)/pkg/version.BuildDate=$(shell date "+%F-%T-%Z") \
-X $(gomodule_name)/pkg/version.PreflightVersion=$(VERSION) \
-X $(gomodule_name)/pkg/version.Commit=$(GITCOMMIT) \
-X $(gomodule_name)/pkg/version.BuildDate=$(shell date "+%F-%T-%Z") \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra \ at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants