chore: Replace GoReleaser with custom build scripts#660
Draft
aaron-zeisler wants to merge 6 commits into
Draft
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>
… script - Create scripts/release.sh as a single entry point that orchestrates cross-compile, build-packages, and docker-build in sequence. - Remove unnecessary BINARY ARG from Dockerfiles; instead pass the binary's directory as the Docker build context so the existing COPY ld-relay instruction works unchanged. - Simplify publish action.yml from multiple steps to one. - Simplify Makefile publish/products-for-release to one-liners. 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 focused shell scripts that handle cross-compilation, system packaging, and Docker image builds independentlygo build, standalonenfpm, anddocker buildxscripts/release.shas a single orchestration entry point, keeping the publish action and Makefile minimalMotivation
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/release.shscripts/cross-compile.shscripts/build-packages.shscripts/docker-build.shnfpm.yml.github/actions/publish/action.ymlrelease.sh.github/workflows/ci.ymlnfpminstallation for Docker Scout scan jobMakefilepublishandproducts-for-releaseare now one-liners callingrelease.shDockerfile*.goreleaserdocker-build.shpasses the binary directory as the build context.goreleaser.ymlscripts/run-goreleaser.shArchitecture
Each script can also be run independently for debugging or selective builds.
Test plan
scripts/cross-compile.sh— all 9 targets build successfully (tested locally)scripts/build-packages.sh— all 8 packages (4 arch × deb + rpm) built successfully (tested locally)scripts/docker-build.sh --dry-run— all 10 Docker images built and loaded locally (tested locally)scripts/release.sh --dry-run— full end-to-end pipeline completes successfully (tested locally)JIRA
SDK-2337