Skip to content

chore(docker): refactor goreleaser with YAML anchor and merge keys#1421

Merged
kongfei605 merged 2 commits intoflashcatcloud:mainfrom
kongfei605:ci_up
Apr 9, 2026
Merged

chore(docker): refactor goreleaser with YAML anchor and merge keys#1421
kongfei605 merged 2 commits intoflashcatcloud:mainfrom
kongfei605:ci_up

Conversation

@kongfei605
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings April 9, 2026 03:31
@kongfei605 kongfei605 merged commit b70d650 into flashcatcloud:main Apr 9, 2026
2 checks passed
@kongfei605 kongfei605 deleted the ci_up branch April 9, 2026 03:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the release packaging configuration by migrating the GoReleaser setup to v2-style keys/sections and consolidating Docker image builds into a single multi-arch Dockerfile flow.

Changes:

  • Migrate .goreleaser.yaml to version: 2, refactor repeated build settings via YAML anchors, and switch Docker publishing to dockers_v2.
  • Consolidate Docker image builds into docker/Dockerfile.goreleaser using TARGETPLATFORM-based binary selection and executable permissions via --chmod.
  • Remove the now-redundant docker/Dockerfile.goreleaser.arm64.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
docker/Dockerfile.goreleaser.arm64 Removed the arm64-specific GoReleaser Dockerfile in favor of a single multi-arch Dockerfile.
docker/Dockerfile.goreleaser Updated base image and refactored binary/entrypoint copies to be platform-aware and executable.
.goreleaser.yaml Migrated config to v2 schema, introduced anchors, refactored archives, and replaced legacy docker/manifest config with dockers_v2.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .goreleaser.yaml
- no_traces
- no_logs
ldflags:
ldflags: &ldflags_slim
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The &ldflags_slim YAML anchor is defined here but never referenced elsewhere in the file. Either reference it (e.g., via ldflags: *ldflags_slim where applicable) or remove the anchor to avoid confusion during future edits.

Suggested change
ldflags: &ldflags_slim
ldflags:

Copilot uses AI. Check for mistakes.
Comment thread .goreleaser.yaml
ids:
- linux-slim
dockers_v2:
- &base_docker_v2
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

&base_docker_v2 is declared as an anchor but isn’t reused (no *base_docker_v2 reference / merge key). If the intent is to DRY up multiple docker definitions, consider using <<: *base_docker_v2 on the other entries; otherwise remove the unused anchor.

Suggested change
- &base_docker_v2
-

Copilot uses AI. Check for mistakes.
Comment thread .goreleaser.yaml
Comment on lines 133 to +137
- id: categraf-slim
builds:
- linux-slim
format: tar.gz
format_overrides:
- goos: windows
format: zip
ids:
- linux-metrics-agent
formats:
- tar.gz
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

This change removes the linux-slim build and repoints the categraf-slim archive to linux-metrics-agent, which changes the produced “slim” artifact (previously linux-slim had additional build tags like no_prometheus). Please confirm this behavior change is intended; if “slim” should still exclude Prometheus, add the missing build tag(s) to linux-metrics-agent or restore a dedicated slim build.

Copilot uses AI. Check for mistakes.
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