0.36.1 • Published 3 years ago

@myhelix-cdk/buildscripts v0.36.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

codepipeline-buildscripts

This module helps deploy and manage CodePipelines and CodeBuild objects which emulate the legacy GoCD pipelines at Helix. The pipelines execute our legacy build-scripts.

Setup

Once in every sub-account which will be using the CodeBuild objects, add credentials via CLI. Get the PAT from 1Password under helix-codepipeline github.

aws --profile platform-development codebuild import-source-credentials --server-type GITHUB --auth-type PERSONAL_ACCESS_TOKEN --token "$PAT_FROM_1PASSWORD"

Search ImportSourceCredentials at https://docs.aws.amazon.com/cdk/api/latest/docs/aws-codebuild-readme.html for further details

Permissions Management

The github repository must have the CI-CD Write Access role assigned Admin access in order for CDK to deploy the necessary webhooks. You can roll access back to Write once the pipeline has been successfully deployed.

We could make a helix-cdk github user specifically to be a GitHub owner and use that to deploy webhooks and even to manage permissions on our repos.

Manually modify ECR permissions to add second statement, push_from_platform_development.

{
  "Version": "2008-10-17",
  "Statement": [
    {
      "Sid": "all_organization_accounts",
      "Effect": "Allow",
      "Principal": "*",
      "Action": [
        "ecr:BatchCheckLayerAvailability",
        "ecr:BatchGetImage",
        "ecr:DescribeImages",
        "ecr:GetDownloadUrlForLayer",
        "ecr:ListImages"
      ],
      "Condition": {
        "StringEquals": {
          "aws:PrincipalOrgID": "o-oofrutwd0l"
        }
      }
    },
    {
      "Sid": "push_from_platform_development",
      "Effect": "Allow",
      "Principal": {
        "Service": "codebuild.amazonaws.com",
        "AWS": "arn:aws:iam::409670809604:root"
      },
      "Action": [
        "ecr:BatchCheckLayerAvailability",
        "ecr:BatchGetImage",
        "ecr:CompleteLayerUpload",
        "ecr:DescribeImages",
        "ecr:DescribeImageScanFindings",
        "ecr:DescribeRepositories",
        "ecr:GetAuthorizationToken",
        "ecr:GetDownloadUrlForLayer",
        "ecr:GetRepositoryPolicy",
        "ecr:GetLifecyclePolicy",
        "ecr:GetLifecyclePolicyPreview",
        "ecr:InitiateLayerUpload",
        "ecr:ListImages",
        "ecr:ListTagsForResource",
        "ecr:PutImage",
        "ecr:UploadLayerPart"
      ]
    }
  ]
}
0.36.1

3 years ago

1.77.0

3 years ago

0.35.1-alpha.22

3 years ago

0.36.0

3 years ago

0.35.1

3 years ago

0.35.0

3 years ago

0.34.0

4 years ago

0.33.0

4 years ago

0.32.0

4 years ago

0.31.0

4 years ago

0.30.0

4 years ago

0.29.0

4 years ago

0.28.4

4 years ago

0.28.3

4 years ago

0.28.2

4 years ago

0.28.1

4 years ago

0.28.0

4 years ago

0.27.0

4 years ago

0.26.2

4 years ago

0.26.1

4 years ago

0.26.0

4 years ago

0.25.1

4 years ago

0.25.0

4 years ago

0.24.1

4 years ago

0.24.0

4 years ago

0.23.0

4 years ago

0.22.0

4 years ago

0.21.0

4 years ago

0.20.5

4 years ago

0.20.4

4 years ago

0.20.3

4 years ago