[SDK-2337] Replace GoReleaser with custom build scripts#660
Draft
aaron-zeisler wants to merge 4 commits into
Draft
[SDK-2337] Replace GoReleaser with custom build scripts#660aaron-zeisler wants to merge 4 commits into
aaron-zeisler wants to merge 4 commits into
Conversation
Remove the 529-line .goreleaser.yml and replace it with three focused shell scripts that handle cross-compilation, system packaging, and Docker image builds independently. - scripts/cross-compile.sh: builds all 9 OS/arch targets using go build, produces .tar.gz archives and checksums.txt - scripts/build-packages.sh: uses standalone nfpm to create .deb/.rpm packages from pre-built binaries - scripts/docker-build.sh: uses docker buildx for multi-platform builds across 3 image variants, creates multi-arch manifests - nfpm.yml: standalone package configuration (previously embedded in GoReleaser config) - Updated .github/actions/publish/action.yml to orchestrate the new scripts, preserving attestation outputs and dry-run support - Updated Dockerfiles to accept BINARY build arg for flexible binary path injection - Updated Makefile publish/products-for-release targets Tracked by SDK-2337. Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
…nerate metadata The Docker Scout Scan CI job was failing because: 1. nfpm was not installed (build-packages.sh needs it) 2. products-for-release didn't build Docker images 3. dist/metadata.json was not generated for version extraction Fixes: - Install nfpm via go install in CI workflow - Add docker-build.sh --dry-run to products-for-release target - Use --load flag in dry-run mode so images are available locally - Generate dist/metadata.json in cross-compile.sh Co-authored-by: Cursor <cursoragent@cursor.com>
Standalone nfpm uses 'depends' for package dependencies under overrides, not 'dependencies' (which is the GoReleaser-embedded nfpm syntax). Co-authored-by: Cursor <cursoragent@cursor.com>
nfpm does not expand environment variables in contents[].src paths. Pre-process nfpm.yml through envsubst before passing to nfpm to ensure VERSION and NFPM_ARCH_LABEL are properly substituted. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.goreleaser.ymlwith three focused shell scripts that handle cross-compilation, system packaging, and Docker image builds independentlygo build, standalonenfpm, anddocker buildxMotivation
GoReleaser is opaque and difficult to debug when releases fail. Other LaunchDarkly teams (gonfalon, event-recorder, streamer, foundation) don't use it, and sdk-meta already removed it. The new scripts are individually testable, readable (~60-100 lines each vs 529 lines of YAML), and follow patterns established elsewhere in the org.
Changes
scripts/cross-compile.shscripts/build-packages.shscripts/docker-build.shnfpm.yml.github/actions/publish/action.ymlDockerfile*.goreleaserBINARYbuild arg for flexible binary pathMakefile.goreleaser.ymlscripts/run-goreleaser.shTest plan
scripts/cross-compile.shtested locally — all 9 targets build successfullyscripts/build-packages.sh— requiresnfpm(will test in CI)scripts/docker-build.sh— requires Docker buildx with multi-platform support (will test in CI)JIRA
SDK-2337
Made with Cursor