Software Development Content Management Guidelines

Overview

GitHub Webhooks trigger Jenkins Build

Jenkins Copies GitHub repository and build the Docker based on the image pushed on repo

Docker container is builded and started with shell scripts on our AWS Cloud Infrastructure

1 -

2 -

3 -

Version Management

Guidelines

  • Every commit, message and code, has to be reviewed before it can be merged.
  • Every commit has to have an issue in its message.
  • Changes can only be made with feature branches and merged with pull requests.
  • Pull requests cannot be merged unless it its guaranteed that the target branch will still build after merge.
  • Pull requests cannot be merged unless, at least, one other developer has reviewed it.
  • Static code analysis will be made on every pull request.

 

Jenkins CI/CD Guidelines

  • Use "file fingerprinting" to manage dependencies.
  • Setup a different job/project for each maintenance or development branch you create
  • Avoid scheduling all jobs to start at the same time
  • Set up email notifications mapping to ALL developers in the project, so that everyone on the team has his pulse on the project's current status.

  • Tag, label, or baseline the codebase after the successful build.

  • Always configure your job to generate trend reports and automated testing when running a build

 

Docker Guidelines

  • Sort multiline arguments alphanumerically to help avoid duplication of packages and make the list easier to update.
  • Avoid installing unnecessary packages
  • The number of instructions and layers should be kept to a minimum as this ultimately affects build performance and time
  • The container created with the image produced by Dockerfile should be ephemeral and immutable

  • To increase the build’s performance, you should exclude files and directories by adding a .dockerignore file to that directory

  • For the development environments, map your source code on the host to a container using a volume.

 

AWS (Serverless Architecture) Guidelines

  • Load test your Lambda function to determine an optimum timeout value.

  • Trim the dependencies included to just the runtime essentials.

  • Locally test an API you define in your SAM template before it is created in API Gateway
  • Create a repository or project branch that enables you to correlate deployments with incremental commits on a release branch.

  • You must unit test your code thoroughly, focusing mostly

    on the business logic outside your handler function