Skip to content

feat: implement gostrap promote command#41

Merged
y0s3ph merged 1 commit into
mainfrom
feat/promote-command
Mar 10, 2026
Merged

feat: implement gostrap promote command#41
y0s3ph merged 1 commit into
mainfrom
feat/promote-command

Conversation

@y0s3ph

@y0s3ph y0s3ph commented Mar 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds gostrap promote <app> --from <env> --to <env> command that copies overlay files between environments
  • Shows a unified diff preview before applying changes (reuses the differ engine from gostrap diff command #19)
  • Copies overlay files to target environment, skipping files that are already identical
  • Supports --dry-run to preview without modifying, --yes to skip interactive confirmation
  • Promotes all apps when no app name is provided
  • Works with both Kustomize and Helm repos
  • Includes 12 unit tests covering file copy, skip-identical, dry-run, multi-app, Helm, and error cases
  • Updates README roadmap (marks promote as done) and project structure

Closes #21

Test plan

  • go test -race ./... — all tests pass
  • golangci-lint run — 0 issues
  • Smoke test: gostrap promote example-api --from dev --to staging --dry-run shows diff without modifying
  • Smoke test: gostrap promote example-api --from dev --to staging --yes copies overlay and reports result

Add environment promotion that copies overlay files from a source
environment to a target environment for one or all applications.

The promote flow:
- Shows a unified diff preview before applying (reuses differ engine)
- Copies overlay files (kustomization.yaml / values.yaml) to target
- Skips files that are already identical
- Supports --dry-run to preview without modifying
- Supports --yes to skip interactive confirmation
- App definitions are not touched (they already point to correct paths)

Includes 12 unit tests covering file copying, skip-identical, dry-run,
multi-app promotion, Helm repos, error cases, and preview.
Updates README roadmap and project structure.
@y0s3ph y0s3ph self-assigned this Mar 10, 2026
@y0s3ph y0s3ph merged commit dd1d769 into main Mar 10, 2026
3 checks passed
@y0s3ph y0s3ph deleted the feat/promote-command branch March 10, 2026 10:13
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.

gostrap promote command

1 participant