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

Automating the release process using Github workflows #3101

Merged
merged 81 commits into from
Oct 21, 2024

Conversation

bcdurak
Copy link
Contributor

@bcdurak bcdurak commented Oct 18, 2024

Describe changes

I implemented two new Github workflows and a bunch of scripts to automate our release process.

(The description of the PR mentions most things already. I will update it again when I have time.)

1. Workflow: release-prepare

Triggers the following jobs when a PR is opened from a misc/prepare-release-X branch.

  • Prepares changes
    • Validates the new version
    • Sends a message to Discord
    • Creates and formats the Alembic migration
    • Updates README, pyproject, VERSION and helm files
    • Updates the references in example/quickstart
    • Auto generates the RELEASE_NOTES and appends it to the file
    • Pushes the changes to the misc/prepare-release-X branch
  • Builds test images
    • Builds a base image using docker/zenml-dev.Dockerfile
    • Builds a server image docker/zenml-server-dev.Dockerfile
    • Builds a quickstart image per major cloud provider using docker/zenml-quickstart-dev.Dockerfile
    • Pushes the image to the target locations (AWS Quickstart image has to be hosted on AWS)
  • Sets up the release prep tenant
    • We have a dedicated staging Release Prep tenant which is configured to use the image built by the previous job
    • It deactivates it and redeploys it so it will use the newly built server image.
    • (The stacks are already set up in this tenant.)
  • Run Quickstart pipelines
    • Connects to the Release Prep tenant
    • Installs ZenML and the required integrations based on the cloud provider
    • Runs the quickstart example

2. Workflow: release-finalize

Triggers when a PR is merged from a branch with the misc/prepare-release-X pattern.

  • Fetch versions
    • Fetch the new and old version (used as inputs to the following steps)
  • Create the release branch
    • Checkout to develop
    • Create the release branch
  • Add docs warning header
    • Checkout to release/old_version
    • Add the warning headers to the docs pages
    • Open up a PR
  • Add the new version to migration tests
    • Checkout to develop
    • Check whether it is necessary to add the new version to the migration tests using alembic history
    • Open up a PR if that's the case
  • Order gitbook spaces
    • Use the gitbook API to order the gitbook spaces between the docs and the legacy docs
  • Deprecate the docs of the latest release on gitbook
    • Checkout to docs/legacy-docs-page
    • Adjust the cards to include the newly deprecated latest release with the proper link
    • Open up a PR

Remaining TODOs

  • Test new version might fail if the latest version is 0.42.0rc

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to docs, I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • I have based my new branch on develop and the open PR is targeting develop. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.
  • If my changes require changes to the dashboard, these changes are communicated/requested.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

@github-actions github-actions bot added internal To filter out internal PRs and issues enhancement New feature or request labels Oct 18, 2024
release-cloudbuild-preparation.yaml Outdated Show resolved Hide resolved
scripts/validate-new-version.sh Show resolved Hide resolved
@bcdurak bcdurak requested a review from schustmi October 21, 2024 15:24
@bcdurak bcdurak merged commit b1901fc into develop Oct 21, 2024
69 of 71 checks passed
@bcdurak bcdurak deleted the feature/PRD-631-automating-the-release-process branch October 21, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal To filter out internal PRs and issues run-slow-ci
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants