cluster-api-provider-aws: LDFLAGS are missing in cloudbuild
/kind bug
What steps did you take and what happened: [A clear and concise description of what the bug is.]
In cloudbuild, there isn’t actually a git checkout, it’s a copy of the code only. During build, we pass in LDFLAGS for version information that are computed with git. This errors in Make, and the LDFLAGS are blank, which means that version info doesn’t make it into the binary.
What did you expect to happen: Version info gets built.
Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]
Environment:
- Cluster-api-provider-aws version:
- Kubernetes version: (use
kubectl version): - OS (e.g. from
/etc/os-release):
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (12 by maintainers)
I synced with @sbueringer today since I found the same issue in CAPZ. The issue is the
.gitfolder doesn’t get copied when we try to get the folder on gcloud. I opened a PR on CAPZ with a simple fix to clone the.gitfolder. The version script is coming from here, and where it tries to save the values to a file and read them back, so maybe that approach could work. If anyone has ideas I’d be happy to collab./assign
Opened this PR to fix this in test-infra
@Jont828 feel free to assign yourself on this issue.