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

Create registry dev environment #95

Merged
merged 11 commits into from
Dec 13, 2023
Merged

Conversation

Evi1Pumpkin
Copy link
Contributor

@Evi1Pumpkin Evi1Pumpkin commented Dec 7, 2023

We want to create a dev environment for our registry, for easy development without impacting production.

The idea

  1. The dev environment will use a new DEV bucket.
  2. We'll run the dev environment workflows through the Actions screen. The workflows will run separately, so we can test each part of the flow without triggering the whole process.
  3. Before triggering a workflow we'll choose the workflow's branch and the environment from the dropdowns before each run:
Screenshot 2023-12-07 at 16 26 34
  1. On dev environment, we'll commit and push changes in the registry's data to a new generated branch called <original-branch-name>-bump-versions-<unix-timestamp>. So we won't make the branch dirty with unwanted changes.

Changes

  1. Cron moved to bump-and-publish-versions-prod.yml.
  2. bump-versions.yml and generate-and-deploy.yml can now be triggered as sub-workflows (by bump-and-publish-versions-prod.yml), or dispatched from the actions screen for development porpuses.
  3. bump-versions.yml and generate-and-deploy.yml get the environment setting as an input.
  4. If bump-versions.yml was triggered with the development env, it'll push the changes to a new branch.

How to use the registry dev environment

I created a branch with changes and want to run it targeting the dev registry. The branch is called Evi1Pumpkin-patch-1.

  1. I go to the Actions screen, choose the Bump Provider and Module Versions workflow, and run it using my new branch:
Screenshot 2023-12-11 at 21 53 37
  1. The modules and providers' data is pushed to a new branch called Evi1Pumpkin-patch-1-bump-versions-1702366742. I can get it from the Print Branch step. If you have a better idea on how to make it more user-friendly I would love to hear.
Screenshot 2023-12-12 at 10 21 24 3. When I run `Generate and Sync Files` workflow, I supply the new branch as the source of the code and the providers and modules branch: Screenshot 2023-12-12 at 17 47 44

Fixes #64

@Evi1Pumpkin Evi1Pumpkin force-pushed the create-registry-dev-environment branch 3 times, most recently from 1b83661 to ba36763 Compare December 11, 2023 07:15
… cron

Signed-off-by: Ronny Orot <ronny.orot@gmail.com>
Signed-off-by: Ronny Orot <ronny.orot@gmail.com>
Signed-off-by: Ronny Orot <ronny.orot@gmail.com>
Signed-off-by: Ronny Orot <ronny.orot@gmail.com>
Signed-off-by: Ronny Orot <ronny.orot@gmail.com>
Signed-off-by: Ronny Orot <ronny.orot@gmail.com>
@Evi1Pumpkin Evi1Pumpkin force-pushed the create-registry-dev-environment branch from ba36763 to 332e27d Compare December 11, 2023 16:44
Signed-off-by: Ronny Orot <ronny.orot@gmail.com>
@Evi1Pumpkin Evi1Pumpkin marked this pull request as ready for review December 12, 2023 08:47
@Evi1Pumpkin Evi1Pumpkin requested review from a team and cube2222 December 12, 2023 08:50
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

I don't know the codebase enough to approve or request changes, but it seems to me that the upload would still happen to the same bucket. From what I read, this is not the intention? (Also, added some nitpicks.) Nevermind, I completely misread the code.

.github/workflows/bump-versions.yml Show resolved Hide resolved
.github/workflows/generate-and-deploy-with-delete.yml Outdated Show resolved Hide resolved
.github/workflows/generate-and-deploy.yml Show resolved Hide resolved
Signed-off-by: Ronny Orot <ronny.orot@gmail.com>
@Evi1Pumpkin Evi1Pumpkin force-pushed the create-registry-dev-environment branch from ad1bdd6 to bd0e4cb Compare December 12, 2023 15:22
Signed-off-by: Ronny Orot <ronny.orot@gmail.com>
Signed-off-by: Ronny Orot <ronny.orot@gmail.com>
@Evi1Pumpkin Evi1Pumpkin merged commit 2e40009 into main Dec 13, 2023
1 check passed
@Evi1Pumpkin Evi1Pumpkin deleted the create-registry-dev-environment branch December 13, 2023 13:08
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.

Implement a dev bucket and workflow to publish to the devregistry.
4 participants