From 4a83fbe0c176625c5d5ba162a747ad470ba04a48 Mon Sep 17 00:00:00 2001 From: Patrick Robinson Date: Thu, 17 Oct 2019 16:22:28 +1100 Subject: [PATCH 1/3] Add option to pass region --- README.md | 4 ++++ hooks/command | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 87659d4..7e242ff 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,10 @@ The minimum and maximum percentage of tasks that should be maintained during a d Example: `"0/100"` +### `region` (option) + +The region we deploy the ECS Service to. + ## AWS Roles At a minimum this plugin requires the following AWS permissions to be granted to the agent running this step: diff --git a/hooks/command b/hooks/command index 47a2443..6d96e30 100755 --- a/hooks/command +++ b/hooks/command @@ -39,6 +39,11 @@ load_balancer_name=${BUILDKITE_PLUGIN_ECS_DEPLOY_LOAD_BALANCER_NAME:-""} target_container=${BUILDKITE_PLUGIN_ECS_DEPLOY_TARGET_CONTAINER_NAME:-""} target_port=${BUILDKITE_PLUGIN_ECS_DEPLOY_TARGET_CONTAINER_PORT:-""} execution_role=${BUILDKITE_PLUGIN_ECS_DEPLOY_EXECUTION_ROLE:-""} +region=${BUILDKITE_PLUGIN_ECS_DEPLOY_REGION:-""} + +if [[ $region != "" ]]; then + AWS_DEFAULT_REGION=${region} +fi # Resolve any runtime environment variables it has target_group=$(eval "echo $target_group") From 77f53ad4ed1d92017f03fa6b9197235d22aab6e7 Mon Sep 17 00:00:00 2001 From: Patrick Robinson Date: Wed, 23 Oct 2019 14:13:43 +1100 Subject: [PATCH 2/3] Fix a word --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e242ff..00cef6e 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ The minimum and maximum percentage of tasks that should be maintained during a d Example: `"0/100"` -### `region` (option) +### `region` (optional) The region we deploy the ECS Service to. From f914c16a844f986e169931f14594d24d9739d820 Mon Sep 17 00:00:00 2001 From: Patrick Robinson Date: Wed, 23 Oct 2019 14:14:20 +1100 Subject: [PATCH 3/3] Bump version, adds region parameter --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00cef6e..a6b5b3e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ steps: concurrency_group: "my-service-deploy" concurrency: 1 plugins: - - ecs-deploy#v1.2.0: + - ecs-deploy#v1.3.0: cluster: "my-ecs-cluster" service: "my-service" task-definition: "examples/hello-world.json"