CodePipeline Fargate

Set up a CodePipeline for a ECS Fargate rolling deploy

  1. Make sure you set up a buildspec in the git repository first (see setup buildspec)
  2. Go to CodePipeline in AWS.
  3. Click on Create pipeline.
  4. Fill in a pipeline name (e.g. test-mc-embed-api)
  5. Choose existing service role and select eu-west-1-codepipeline.
  6. Click next.
  7. Select GitHub as source provider.
  8. Click Connect to GitHub and authorize access.
  9. In repository choose the git repo (e.g. my-channels/mychannels-elixir-vaas)
  10. Choose a branch which is used to deploy (e.g. test-embed-api)
  11. Click next.
  12. Select AWS CodeBuild as build provider.
  13. For project name click Create project, this will open a new window.
  14. Fill in a project name (e.g. test-mc-embed-api)
  15. Choose Managed image as environment image.
  16. Select Ubuntu as operating system.
  17. Select Standard as runtime.
  18. Select aws/codebuild/standard:1.0 as image.
  19. Enable privileged checkbox.
  20. Choose Existing service role as service role.
  21. Select mc-codebuild-ecr-role as role ARN.
  22. Open additional configuration.
  23. For environment variables, fill in values used by buildspec created in step 1 (e.g. CONTAINER_NAME=test-mc-embed-api and TAG_TARGET=test)
  24. Choose Use a buildspec file as build specifications.
  25. Fill in buildspec path (e.g. apps/vaas_embed_api/buildspec.yml)
  26. Click continue to CodePipeline, you're now back in the old window.
  27. Click next.
  28. Select Amazon ECS as deploy provider.
  29. Choose cluster name (e.g. test)
  30. Choose service name (e.g. test-mc-fox-sports)
  31. Click next.
  32. Review everything and click create pipeline.
Last Updated: 10/1/2019, 10:07:22 AM