Skip to content

Commit

Permalink
Merge pull request #768 from pepperize/blsmth-add-ecr-login-manager
Browse files Browse the repository at this point in the history
fix: blsmth add ecr login manager
  • Loading branch information
pflorek authored Jan 7, 2024
2 parents c456bcb + 4545cbd commit cd20c13
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion src/runner/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,23 @@ export class GitlabRunnerAutoscalingManager extends Construct {
},
],
}),
ECRLogin: PolicyDocument.fromJson({
Version: "2012-10-17",
Statement: [
{
Effect: "Allow",
Action: ["ecr:BatchGetImage", "ecr:GetAuthorizationToken", "ecr:GetDownloadUrlForLayer"],
Resource: "*",
},
],
}),
},
});

this.userData = UserData.forLinux({});
this.userData.addCommands(
`yum update -y aws-cfn-bootstrap` // !/bin/bash -xe
`yum update -y aws-cfn-bootstrap`, // !/bin/bash -xe
`yum install -y amazon-ecr-credential-helper`
);

// https://github.com/awslabs/amazon-ecr-credential-helper
Expand Down
17 changes: 17 additions & 0 deletions test/runner/__snapshots__/manager.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions test/runner/__snapshots__/runner.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cd20c13

Please sign in to comment.