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

chore: introduce preview tagged #123

Closed
wants to merge 13 commits into from

Conversation

thisislawatts
Copy link
Member

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.

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.

1 participant