Skip to content

Commit

Permalink
fix: kopioi localstack ECR:ään jotta testaus voi käyttää sitä sieltä (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
haapamakim committed Oct 11, 2021
1 parent ca76d8e commit 73d83c5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions deployment/bin/updateECRImages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

aws ecr create-repository --repository-name localstack || true
docker pull localstack/localstack:latest
aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 283563576583.dkr.ecr.eu-west-1.amazonaws.com
docker tag localstack/localstack:latest 283563576583.dkr.ecr.eu-west-1.amazonaws.com/localstack:latest
docker push 283563576583.dkr.ecr.eu-west-1.amazonaws.com/localstack:latest
4 changes: 3 additions & 1 deletion deployment/lib/hassu-pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class HassuPipelineStack extends Stack {
await this.createPipeline(env, config, [
"npm run generate",
"npm run lint",
"aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 283563576583.dkr.ecr.eu-west-1.amazonaws.com",
"npm run localstack",
"npm run test",
"npm run localstack:stop",
Expand All @@ -45,6 +46,7 @@ export class HassuPipelineStack extends Stack {
await this.createPipeline(env, config, [
"npm run generate",
"npm run lint",
"aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 283563576583.dkr.ecr.eu-west-1.amazonaws.com",
"npm run localstack",
"npm run test",
"npm run localstack:stop",
Expand Down Expand Up @@ -151,7 +153,7 @@ export class HassuPipelineStack extends Stack {
}).addToRolePolicy(
new PolicyStatement({
effect: Effect.ALLOW,
actions: ["s3:*", "cloudformation:*", "sts:*", "ssm:GetParameter"],
actions: ["s3:*", "cloudformation:*", "sts:*", "ssm:GetParameter", "ecr:*"],
resources: ["*"],
})
);
Expand Down
2 changes: 1 addition & 1 deletion deployment/localstack/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.8"
services:
localstack:
image: localstack/localstack
image: 283563576583.dkr.ecr.eu-west-1.amazonaws.com/localstack:latest
ports:
- "4566-4584:4566-4584"
- "${PORT_WEB_UI-8080}:${PORT_WEB_UI-8080}"
Expand Down

0 comments on commit 73d83c5

Please sign in to comment.