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

Dev 338/integrated cd #3020

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions .github/workflows/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# CI/CD Information

## Architecture Overview

![alt text](1b06ff8b-222b-4286-b31b-52b8b9612c85.png)

The CI/CD pipeline consists of three main stages:

- Dev Environment
- SB Environments
- Prod Environments

## List of Workflows
| Scenarios | Actions |
|-----------|---------|
| **Deploy to Dev Environment** | [Build and Deploy to Dev](https://github.com/ballerine-io/ballerine/actions/workflows/) |
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix incomplete workflow URLs.

The following workflow links are incomplete:

  • Deploy to Dev: Missing workflow filename
  • Dashboard action: Missing workflow filename

Please update with the correct workflow filenames.

Also applies to: 24-24

| **Promote to SB** | [Promote Action](https://github.com/ballerine-io/ballerine/actions/workflows/deploy-wf-service.yml) |
| **Promote to Prod** | [Promote Action](https://github.com/ballerine-io/ballerine/actions/workflows/deploy-wf-service.yml) |
| **Run Migrations** | [Run Migrations Action](https://github.com/ballerine-io/wf-data-migration/actions/workflows/CD-v2.yml) |
| **Perform Hotfix** | [Hotfix Action](https://github.com/ballerine-io/ballerine/actions/workflows/hotfix-wf-service.yml) |
| **Create Preview Environment** | [Preview Environment](https://github.com/ballerine-io/ballerine/actions/workflows/build-preview-environment.yml) |
| **Deploy Backoffice** | [Backoffice action](https://github.com/ballerine-io/ballerine/actions/workflows/deploy-backoffice.yml) |
| **Deploy KYB** | [KYB action](https://github.com/ballerine-io/ballerine/blob/dev/.github/workflows/deploy-kyb.yml) |
| **Deploy Dashboard** | [Dashboard action](https://github.com/ballerine-io/ballerine/blob/dev/.github/workflows/) |

## Workflow Scenarios

1. **Deploy to Dev Environment**: [Build and Deploy to Dev](https://github.com/ballerine-io/ballerine/actions/workflows/push-workflows-service-image.yml)
- Push code to dev branch
OR
Manually trigger workflow_dispatch with `dev` branch

2. **Promote to SB**: [Promote Action](https://github.com/ballerine-io/ballerine/actions/workflows/deploy-wf-service.yml)
- Pass the environment input value as `SB`.
- this will deploy the latest present version in `dev` to `SB`.

3. **Promote to Prod**: [Promote Action](https://github.com/ballerine-io/ballerine/actions/workflows/deploy-wf-service.yml)
- Pass the environment input value as `prod`.
- this will deploy the latest present version in `sb` to `prod`.

4. **Run Migrations** from a specific branch in `wf-data-migration` repo in a specific environment: [Run Migrations Action](https://github.com/ballerine-io/wf-data-migration/actions/workflows/CD-v2.yml)
- Pass the branch from which you want to run the migration code and the environment name on which you want to run the action.

5. **Perform Hotfix** on any environment: [Hotfix Action](https://github.com/ballerine-io/ballerine/actions/workflows/hotfix-wf-service.yml)
- Pass the branch and the environment on which you want to perform the hotfix and run the workflow.

6. **Create Preview Environment** from specific branch: [Preview Environment](https://github.com/ballerine-io/ballerine/actions/workflows/build-preview-environment.yml)
- Add a label `deploy-pr` in your Pull request. (runs the workflow automatically)
- Run the workflow manually with the provided branch name and the preview environment build and deployment will start.

7. **Deploy Front-end Apps**:
- Deploy **Backoffice** Manually: [Backoffice action](https://github.com/ballerine-io/ballerine/actions/workflows/deploy-backoffice.yml)
- Deploy **KYB** Manually: [KYB action](https://github.com/ballerine-io/ballerine/blob/dev/.github/workflows/deploy-kyb.yml)
- Deploy **Dashboard** Manually: [Dashboard action](https://github.com/ballerine-io/ballerine/blob/dev/.github/workflows/deploy-dashboard.yml)

- Note: Provide the environment name on which you want to trigger the deployment.


## Prerequisites

- Github Actions access
- Repository permissions
Comment on lines +61 to +62
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance prerequisites with specific requirements.

The current prerequisites are too vague. Consider adding more details:

- Github Actions access
- Repository permissions
+ GitHub Actions access:
+   - Workflow read/write permissions
+   - Environment deployment permissions
+ Repository permissions:
+   - Write access to deployment branches
+   - Access to environment secrets
+   - ArgoCD access tokens (if required)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Github Actions access
- Repository permissions
GitHub Actions access:
- Workflow read/write permissions
- Environment deployment permissions
Repository permissions:
- Write access to deployment branches
- Access to environment secrets
- ArgoCD access tokens (if required)

Loading