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

Devops/2337 deploy develop on pr merge #2401

Merged
merged 9 commits into from
Feb 15, 2023

Conversation

George-Hudson
Copy link

@George-Hudson George-Hudson commented Feb 8, 2023

Summary of Changes

This tracks pushes to the develop branch and triggers a build and deploy to the develop environment, followed by kicking off Cypress end to end integration testing against the newly deployed env
Pull request closes #2337

How to Test

This will set up a deployment pipeline that only tracks the develop branch
Future tests for this will be when a PR merge (Including this one) kicks off a build, deploy, and test pipeline.
To test the functionality prior to this PR, instead of tracking the develop branch, this devops/2337-deploy-develop-on-pr-merge was put in as a placeholder, but still deployed to the develop environment.

This GitHub Action kicked off the CircleCI Pipeline. Tests against the newly deployed environment can be seen as part of that pipeline

The tracked branch was changed to develop before initiating this PR. The deploy and e2e tests were not kicked off but when this PR is merged, a corresponding GitHub Action and CircleCI build should immediately start.

Deliverables

This is part of a larger initiative to refine Continuous Integration and Continuous Deployment pipelines to improve developer quality of life, confidence in higher level deployments (staging and production), and enabling safe, secure, and granular updates to the live assets

Deliverable 1: Accepted Features

Checklist of ACs:

  • Upon any merge to develop GitHub Actions kicks off a CircleCI pipeline
  • That CircleCI pipeline deploys the changes to the develop environment
  • After the deploy, Cypress Tests are run against the deployed environment
  • The test results can be seen within the logs of the pipeline
  • lfrohlich and/or adpennington confirmed that ACs are met.

Deliverable 2: Tested Code

This PR does not include frontend or backend changes and the app should function identically as before. The process should be continuously monitored by interested parties to look for improvements or breaking pipelines.

Deliverable 3: Properly Styled Code

  • Are backend code style checks passing on CircleCI?
  • Are frontend code style checks passing on CircleCI?
  • Are code maintainability principles being followed?

Deliverable 4: Accessible

  • Does this PR complete the epic?
  • Are links included to any other gov-approved PRs associated with epic?
  • Does PR include documentation for Raft's a11y review?
  • Did automated and manual testing with iamjolly and ttran-hub using Accessibility Insights reveal any errors introduced in this PR?

Deliverable 5: Deployed

  • Was the code successfully deployed via automated CircleCI process to development on Cloud.gov?

Deliverable 6: Documented

  • Does this PR provide background for why coding decisions were made?
  • If this PR introduces backend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces frontend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces dependencies, are their licenses documented?
  • Can reviewer explain and take ownership of these elements presented in this code review?

Deliverable 7: Secure

  • Does the OWASP Scan pass on CircleCI?
  • Do manual code review and manual testing detect any new security issues?
  • If new issues detected, is investigation and/or remediation plan documented?

Deliverable 8: User Research

This PR used existing tools and scripts and no research was done.
Future research should look at creating:

  • a stateful infrastructure manifest
  • artifact storage
  • environment variable and secrets storage
  • CI/CD pipeline simplification

@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Merging #2401 (20c8243) into develop (030fb2b) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2401   +/-   ##
========================================
  Coverage    92.34%   92.34%           
========================================
  Files          175      175           
  Lines         3854     3854           
  Branches       347      347           
========================================
  Hits          3559     3559           
  Misses         220      220           
  Partials        75       75           
Flag Coverage Δ
dev-backend 91.86% <ø> (ø)
dev-frontend 93.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 030fb2b...20c8243. Read the comment docs.

Comment on lines +45 to +47
"CYPRESS_TOKEN"
"DJANGO_CONFIGURATION"
"DJANGO_DEBUG"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Were these added to CircleCI env vars? Having missing/empty env vars has given us problems in the past.

Copy link
Author

Choose a reason for hiding this comment

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

CYPRESS_TOKEN is already in there, yes. It's actually being used to populate the CYPRESS_TOKEN below. DJANGO_DEBUG is also in there, but I'm not trying to grab it, instead just explicitly setting to "yes"

Copy link
Collaborator

@andrew-jameson andrew-jameson left a comment

Choose a reason for hiding this comment

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

LGTM!

@andrew-jameson andrew-jameson added QASP Review and removed raft review This issue is ready for raft review labels Feb 13, 2023
Copy link
Collaborator

@ADPennington ADPennington left a comment

Choose a reason for hiding this comment

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

thanks @George-Hudson 👍🏾

@andrew-jameson andrew-jameson merged commit 8261650 into develop Feb 15, 2023
@andrew-jameson andrew-jameson deleted the devops/2337-deploy-develop-on-pr-merge branch February 15, 2023 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DevOps] Deploy develop to a cloudgov environment after PR merge
5 participants