Development environment
The development environment is where developers integrate their code together to ensure it all works as one cohesive application. In Gitflow, the development environment contains the latest features included by merge request and are ready for release. In GitHub Flow and Trunk strategies, the development environment is considered to be a testing environment, and the code base might be unstable and unsuitable for deployment to production.
Access
Assign permissions according to the principle of least privilege. Least privilege is the security best practice of granting the minimum permissions required to perform a task. Developers should have less access to the development environment than they have to the sandbox environment.
Build steps
Creating a merge request to the develop
branch (Gitflow) or the
main
branch (Trunk or GitHub Flow) automatically starts the
build.
-
Use git-secrets
(GitHub) to scan for sensitive information -
Lint the source code
-
Build and compile the source code, if applicable
-
Perform unit testing
-
Perform code coverage analysis
-
Perform static code analysis
-
Build IaC
-
Perform IaC security analysis
-
Extract open source licenses
Deployment steps
If you're using the Gitflow model, the deployment steps automatically initiate
when a develop
branch is successfully built in the development
environment. If you're using the GitHub Flow model or Trunk model, then the
deployment steps automatically initiate when a merge request is created against the
main
branch. The following are the deployment steps in the
development environment:
-
Download the published artifacts from the build steps
-
Perform database versioning
-
Perform IaC deployment
-
Perform integration tests
Expectations before moving to the testing environment
-
Successful build and deployment of the
develop
branch (Gitflow) or themain
branch (Trunk or GitHub Flow) in the development environment -
Unit testing passes at 100%
-
Successful IaC build
-
Deployment artifacts were successfully created
-
A developer has performed a manual verification to confirm that the feature is functioning as expected