

# Staging environment


The *staging environment* is configured to be the same as the production environment. For example, the data setup should be similar in scope and size to production workloads. Use the staging environment to verify that code and infrastructure operate as expected. This environment is also the preferred choice for business use cases, such as previews or customer demonstrations.

## Access


Assign permissions according to the principle of least privilege. Developers should have the same access to the staging environment as they do the production environment.

## Build steps


None. The same artifacts that were used in the testing environment are reused in the staging environment.

## Deployment steps


Automatically initiate deployment of the `release` branch (Gitflow) or the `main` branch (Trunk or GitHub Flow) in the staging environment after approval and deployment in the testing environment. The following are the deployment steps in the staging environment:

1. Deploy the `release` branch (Gitflow) or `main` branch (Trunk or GitHub Flow) in the staging environment

1. Pause for manual approval by designated personnel

1. Download published artifacts

1. Perform database versioning

1. Perform IaC deployment

1. (Optional) Perform integration testing

1. (Optional) Perform load testing

1. Obtain approval from the required development, QA, product, or business approvers

## Expectations before moving to the production environment

+ A production-equivalent release has been deployed successfully to the staging environment
+ (Optional) Integration and load testing were successful