diff --git a/deployment/bin/updateECRImages.sh b/deployment/bin/updateECRImages.sh new file mode 100755 index 000000000..7092da58a --- /dev/null +++ b/deployment/bin/updateECRImages.sh @@ -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 diff --git a/deployment/lib/hassu-pipeline.ts b/deployment/lib/hassu-pipeline.ts index a62d5cb3e..ae8920f4d 100644 --- a/deployment/lib/hassu-pipeline.ts +++ b/deployment/lib/hassu-pipeline.ts @@ -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", @@ -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", @@ -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: ["*"], }) ); diff --git a/deployment/localstack/docker-compose.yml b/deployment/localstack/docker-compose.yml index a1732571f..16928fef4 100644 --- a/deployment/localstack/docker-compose.yml +++ b/deployment/localstack/docker-compose.yml @@ -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}"