Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(actions): use GitHub environments for infra deployments #9003

Merged
merged 6 commits into from
Jan 16, 2025

Conversation

gustavovalverde
Copy link
Member

@gustavovalverde gustavovalverde commented Nov 7, 2024

Motivation

We now have a project meant for production services/nodes, with different access control policies in place, but our pipelines are not aware of this environments.

Specifications & References

Issues

This implementation creates a noisy PR with GitHub adding "deployment" comments which can hide other important comments https://github.com/orgs/community/discussions/36919. This can be solved soon-ish actions/runner#2120 (comment)

Solution

  • Use GitHub environments to handle the different authentication accounts and resources needed for deploying into these projects.

Tests

  • All CI related resources should target our dev environment, and releases should match our production environment.
  • Images for releases should be saved in our production environment
  • Release instances should get deployed to our production environment

PR Author's Checklist

  • The PR name will make sense to users.
  • The PR provides a CHANGELOG summary.
  • The solution is tested.
  • The documentation is up to date.
  • The PR has a priority label.

PR Reviewer's Checklist

  • The PR Author's checklist is complete.
  • The PR resolves the issue.

@gustavovalverde gustavovalverde added C-design Category: Software design work A-infrastructure Area: Infrastructure changes A-devops Area: Pipelines, CI/CD and Dockerfiles I-usability Zebra is hard to understand or use P-High 🔥 labels Nov 7, 2024
@gustavovalverde gustavovalverde self-assigned this Nov 7, 2024
@github-actions github-actions bot added C-feature Category: New features C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG labels Nov 7, 2024
@arya2 arya2 added do-not-merge Tells Mergify not to merge this PR and removed do-not-merge Tells Mergify not to merge this PR labels Dec 5, 2024
- Added dynamic environment assignment in `cd-deploy-nodes-gcp.yml` based on event type (release or dev).
- Updated `sub-build-docker-image.yml` to utilize the `inputs.environment` for environment configuration.
- Introduced a strategy matrix for environment selection in `sub-deploy-integration-tests-gcp.yml`, allowing for both dev and prod environments based on the branch.
- Ensured `sub-find-cached-disks.yml` uses the `inputs.environment` for consistency across workflows.
…tions

- Removed the required environment input from `sub-ci-integration-tests-gcp.yml`.
- Updated comments in `sub-deploy-integration-tests-gcp.yml` to clarify the strategy for creating images in dev and prod environments based on the main branch.
…ions

- Changed environment assignment in `cd-deploy-nodes-gcp.yml`, `sub-build-docker-image.yml`, and `sub-find-cached-disks.yml` to use 'dev' as a fallback when the event is not a release, to avoid a `false` fallback
@gustavovalverde gustavovalverde marked this pull request as ready for review January 14, 2025 13:09
Copy link
Contributor

@arya2 arya2 left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

mergify bot added a commit that referenced this pull request Jan 16, 2025
@mergify mergify bot merged commit 1976a56 into main Jan 16, 2025
166 checks passed
@mergify mergify bot deleted the ref-environments branch January 16, 2025 01:37
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles A-infrastructure Area: Infrastructure changes C-design Category: Software design work C-feature Category: New features C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG I-usability Zebra is hard to understand or use P-High 🔥
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants