Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support preview and release candidate channels #122

Merged

Conversation

thisislawatts
Copy link
Member

@thisislawatts thisislawatts commented Jan 7, 2025

This PR introduces a refactor of the GitHub Actions workflows to streamline the build and deployment process across different distribution channels (stable, preview, and rc).

Rationale:

  • This refactor simplifies long-term maintenance by consolidating build logic into a single template.
  • Distribution channels are critical for testing and releasing, and this change ensures workflows stay aligned with the evolving release process.
  • Reduces redundancy and enforces consistency across distribution workflows.

Key Changes:

Workflow Generation Overhaul:

Replaced build.yml with dynamically generated workflows (stable.yml, preview.yml, and rc.yml) based on the new _templates/distribution-channel.yml.erb template.
This change allows more consistent management of distribution channels, reducing duplication and manual edits.

Template Update:

The build.yml.erb template is renamed to distribution-channel.yml.erb to reflect its expanded responsibility of handling multiple channels.
Logic within the template supports distribution-specific postfixes (-preview, -rc), aligning with Snyk CLI release channels.

Ruby Build Script Update (build.rb):

The build script now dynamically generates workflows for each distribution channel by iterating over a distribution_map.
Ensures consistent workflow creation, reducing human error and automating workflow generation for new channels.
Generated Workflow Changes:

preview.yml and rc.yml are added, mirroring the existing stable.yml but adapted for the respective distribution channels.
stable.yml replaces the previous build.yml, maintaining parity with prior stable builds.

Testing:

  • Verified that workflows generate correctly and trigger builds for all channels (stable, preview, rc).
  • Confirmed Docker image tags reflect the appropriate distribution postfix during the build process.

@thisislawatts thisislawatts marked this pull request as ready for review January 7, 2025 14:59
@thisislawatts thisislawatts requested a review from a team as a code owner January 7, 2025 14:59
@thisislawatts thisislawatts force-pushed the feat/support-preview-and-release-candidate-channels branch from e08fd61 to 3c31a62 Compare January 14, 2025 16:22
@thisislawatts thisislawatts merged commit 085eab8 into master Jan 16, 2025
61 checks passed
@thisislawatts thisislawatts deleted the feat/support-preview-and-release-candidate-channels branch January 16, 2025 10:55
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