sequentech / meta

Sequent Public Roadmap
GNU Affero General Public License v3.0
0 stars 0 forks source link

✨ Continuous Deployment fully automated process #543

Open BarelElbazDeveleap opened 5 months ago

BarelElbazDeveleap commented 5 months ago

Preflight checklist

Suggestion

We should automate the whole deployment process using GitHub actions Argocd observes the gitops repo, we should create a branch and PR on gitops repo whenever a release is created on backend services The PR should be opened per environment, and the deployment should happen on merge We should deploy new images (replace the tags using the argo applications) We should run Hasura migrations and similarities when needed

Possible Implementation

No response

Tasks

# Tasks
- [x] Suggest a Design for the automated CD process and review it
- [x] Trigger a GA workflow on the wanted trigger (e.g release is created on backend services repo)
- [x] Branch out gitops per environments and change everything needed in the configuration
- [x] Make argocd automatically syncs everything that enters main branch
- [x] Block direct pushes to main branch for security and stability
- [x] Automate the configuration updates based on the new versions
- [x] Automate the hasura migration execution based on the changed files
- [x] Create a github release with workflow dispatch based gha
- [x] Exclude vx.y.z tags from cleanup in ECR retention policies
- [x] Undo the release in case of failure
- [x] Slack notifications on what version was merged, migrations started / failed etc...
- [ ] Run some tests on the branch before creating the PR like kubeval to verify the argo apps
- [ ] Add a github comment with a diff of changes in the PR for gitops
- [ ] Write ISSUE & PR_TEMPLATE in markdown
- [ ] Run Hasura migrations in dry run when a deployment PR is created
- [x] [Document everything related to the new CD process](https://github.com/sequentech/meta/issues/547)
- [x] Document the helm charts values using helm doc etc...
# Master PRs
- [ ] https://github.com/sequentech/gitops/pull/14
- [ ] https://github.com/sequentech/backend-services/pull/359
- [ ] https://github.com/sequentech/gitops/pull/24
- [ ] https://github.com/sequentech/backend-services/pull/365
- [ ] https://github.com/sequentech/infrastructure/pull/28

Additional context

No response

colethienes commented 4 months ago

Add a github comment with a diff of changes in the PR for gitops

I have an app that does just this. I recently released a Github app called Infro that several companies use internally that allows Argo CD users to preview Kubernetes changes in Github pull requests before they merge. I’m providing it for free to open source projects (here’s an example in the wild). Here’s a setup guide with links to documentation. It’s in early stages, so I’m sure there will be warts. All feedback is welcome!