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] Deploy develop to a cloudgov environment after PR merge #2337

Closed
9 tasks done
jtimpe opened this issue Jan 5, 2023 · 0 comments · Fixed by #2401
Closed
9 tasks done

[DevOps] Deploy develop to a cloudgov environment after PR merge #2337

jtimpe opened this issue Jan 5, 2023 · 0 comments · Fixed by #2401

Comments

@jtimpe
Copy link

jtimpe commented Jan 5, 2023

Description:
After PRs merge we should

  • build and deploy the application/services to a development environment (bonus points for storing the build artifacts for later deployment to production)
  • run end-to-end tests against the deployed application

Acceptance Criteria:
Create a list of functional outcomes that must be achieved to complete this issue

  • develop deploys to [a cloudgov environment] when PRs merge
  • cypress tests run against [the cloudgov environment] once a deployment completes
    • run tests after deployment to any environment? dev, staging, qasp, etc (not prod)
  • Testing Checklist has been run and all tests pass
  • README is updated, if necessary

Tasks:
Create a list of granular, specific work items that must be completed to deliver the desired outcomes of this issue

  • Modify the Circle CI config to deploy the develop branch to [a development environment in cloudgov] after PRs merge
  • Add a step post-deployment to run the cypress e2e tests against [the environment].
    • This requires overriding some environment variables in the cypress run command, as well as adding a CYPRESS_TOKEN environment variable to the Circle CI config and CloudGov app variables.
    • example ci job:
      test-e2e:
      executor: machine-executor
      working_directory: ~/tdp-apps
      steps:
      - checkout
      - docker-compose-check
      - docker-compose-up-backend
      - docker-compose-up-frontend
      - install-nodejs-machine
      - disable-npm-audit
      - install-nodejs-packages:
      app-dir: tdrs-frontend
      - run:
      name: Set up cypress test users
      command: cd tdrs-backend; docker-compose exec web python manage.py generate_cypress_users
      - run:
      name: Run Cypress e2e tests
      command: cd tdrs-frontend; npm run test:e2e-ci
      - store_artifacts:
      path: tdrs-frontend/cypress/screenshots/
      - store_artifacts:
      path: tdrs-frontend/cypress/videos/
    • example of overriding env vars in cypress run:
      "test:e2e-ci": "cypress run --headless --env cypressToken=${CYPRESS_TOKEN}",
    • [update with link to example config once cypress PR merges]
  • Update devops/application documentation to reflect the change in process
  • Run Testing Checklist and confirm all tests pass

Notes:
Add additional useful information, such as related issues and functionality that isn't covered by this specific issue, and other considerations that will be helpful for anyone reading this

  • Note 1
  • Note 2
  • Note 3

Supporting Documentation:
Please include any relevant log snippets/files/screen shots

  • Doc 1
  • Doc 2

Open Questions:
Please include any questions or decisions that must be made before beginning work or to confidently call this issue complete

  • Open Question 1
  • Open Question 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants