Sign inSign up

calidae/bitbucket-pipe-aws-ecs-deploy

By calidae

•Updated over 3 years ago

Deploy services and tasks to ECS https://bitbucket.org/calidae/pipe-aws-ecs-deploy

Image
0

739

calidae/bitbucket-pipe-aws-ecs-deploy repository overview

⁠AWS ECS Deploy

Like https://bitbucket.org/atlassian/aws-ecs-deploy⁠ but better.

⁠Features

  • Deploy multiple services at the same time
  • Run multiple tasks while services are being deployed
  • Fail if any of those tasks exits with a non-zero status code
  • Wait all tasks and stable services at the end

⁠Example usage

# bitbucket-pipelines.yml

# ...

definitions:
  yaml-anchors:
    - &export-aws-oidc >-
        export AWS_WEB_IDENTITY_TOKEN_FILE=$(pwd)/web-identity-token
        && echo $BITBUCKET_STEP_OIDC_TOKEN > $AWS_WEB_IDENTITY_TOKEN_FILE

    - &deploy-step
      oidc: true
      script:
        - *export-aws-oidc
        - pipe: docker://calidae/bitbucket-pipe-aws-ecs-deploy
          variables:
            AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
            AWS_WEB_IDENTITY_TOKEN_FILE: $AWS_WEB_IDENTITY_TOKEN_FILE
            AWS_ROLE_ARN: $AWS_ROLE_ARN
            CLUSTER: myproject-$BITBUCKET_DEPLOYMENT_ENVIRONMENT
            NETWORK_CONFIG: "awsvpcConfiguration={subnets=[subnet-1234],securityGroups=[sg-abcd],assignPublicIp=ENABLED}"
            TASKS: >-
              update-aaa-$BITBUCKET_DEPLOYMENT_ENVIRONMENT
              update-bbb-$BITBUCKET_DEPLOYMENT_ENVIRONMENT
            SERVICES: >-
              aaa
              bbb

pipelines:

  main:
    - step:
        <<: *deploy-step
        name: Deploy dev
        deployment: dev
        trigger: automatic
    - step:
        <<: *deploy-step
        name: Deploy pro
        deployment: pro
        trigger: manual

# ...

Tag summary

Content type

Image

Digest

sha256:5564963bc…

Size

117.5 MB

Last updated

over 3 years ago

docker pull calidae/bitbucket-pipe-aws-ecs-deploy