GitOps
The following directory tree describes a recommended minimal structure that supports the GitOps strategy and the following good practices:
- CI + CD
- Separation between integration and provisioning/deployment
- Optimized build context
- Separation of unit and integration tests
- Decoupled application functions (frontend/backend, serverless functions)
- Restricted access to confidential information (secrets, x509 certificates, etc.)
# Application
# ==================================================
|-- .{{pipeline}} # GitLab CI, AWS CodeBuild/CodeDeploy, Azure Pipelines...
|-- docs # Technical/user documentation
|-- downloads* # Downloads of external dependencies (.gitignore)
|-- hack # Local / agent initialization scripts
|-- src # Application source code
| |-- app1
| | |-- src
| | |-- tests
| | | |-- unit # Unit tests
| | |-- Dockerfile # Open Container Image (OCI) definition
| | |-- VERSION # File containing the application version (SemVer)
| |-- app2
| |-- app3
|-- .gitattributes
|-- CHANGELOG.md # Changes introduced by each delivery
|-- CONTRIBUTING.md # GitFlow contribution rules
|-- README.md # Documentation
# Tests
# ==================================================
|-- .{{pipeline}} # GitLab CI, AWS CodeBuild/CodeDeploy, Azure Pipelines...
|-- docs # Technical/user documentation
|-- downloads* # Downloads of external dependencies (.gitignore)
|-- hack # Local / agent initialization scripts
|-- tests
| |-- integration # Integration tests
| |-- acceptance # User acceptance tests
|-- .gitattributes
|-- CHANGELOG.md # Changes introduced by each delivery
|-- CONTRIBUTING.md # GitFlow contribution rules
|-- README.md # Documentation
# Integration environment
# ==================================================
|-- .{{pipeline}} # GitLab CI, AWS CodeBuild/CodeDeploy, Azure Pipelines...
|-- docs # Technical/user documentation
|-- downloads* # Downloads of external dependencies (.gitignore)
|-- deploy # Provisioning/deployment resources
| |-- cloudformation
| |-- kubernetes
| |-- terraform
|-- hack # Local / agent initialization scripts
|-- tests
| |-- integration # Integration tests
| |-- acceptance # User acceptance tests
|-- .gitattributes
|-- CHANGELOG.md # Changes introduced by each delivery
|-- CONTRIBUTING.md # GitFlow contribution rules
|-- README.md # Documentation
# Pre-production environment
# ==================================================
{{ PR from Integration }}
# Production environment
# ==================================================
{{ PR from Pre-production }}
*included in the.gitignorefile