diff --git a/DOCS.md b/DOCS.md index 31272c2..9849172 100644 --- a/DOCS.md +++ b/DOCS.md @@ -16,7 +16,8 @@ deploy: cluster: Production-DashboardCluster //base cluster name / wildcard family: Production-DashboardTaskDefinition //base family name / wildcard service: Production-DashboardService //base service name / wildcard - constainer_name: dashboard //the name of the container in the definition that uses this image + container_names: + - dashboard //array of conatiner names for each definition allow_multiple_clusters: false //update services on multiple clusters if matched allow_multiple_services: false //update multiple services on a clusters if matched log_level: 'debug' //logging level to output @@ -61,10 +62,10 @@ Again a good example is if you have a environment where instead of using differe ####family The family parameter operates as a wildcard as well, but it is used to match to task definitions. When the plugin matches a cluster and service, it retrieves all the current tasks within that service. From these tasks it derives the currently active task definitions. These are matched / filtered by this setting to determine which task definitions to update. -####constainer_name -The container name is required in order to determine which conatiner within the task definition to update the image name for this build. This setting is intended to accomodate definitions with multiple containers. +####container_names +A list of container names is required in order to determine which containers within the task definition to update the with the new image name for this build. This setting is intended to accomodate definitions with multiple containers. -Note - It is a non-case sensitive exact match on the name. It does not support wildcards. +Note - It is a non-case sensitive exact match on each name in the array. It does not support wildcards. ####allow_multiple_clusters (optional) This defaults to false as a safety precuation. If set to true it will allow matched definitions in multiple clusters to be updated at once. diff --git a/README.md b/README.md index 5b1c83e..856194d 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ npm install (these aren't real aws keys btw) ``` -node app.js -- '{"repo":{"clone_url":"git://github.com/drone/drone","owner":"drone","name":"drone","full_name":"drone/drone"},"system":{"link_url":"https://beta.drone.io"},"build":{"number":22,"status":"success","started_at":1421029603,"finished_at":1421029813,"message":"UpdatetheReadme","author":"johnsmith","author_email":"john.smith@gmail.com","event":"push","branch":"master","commit":"436b7a6e2abaddfd35740527353e78a227ddcb2c","ref":"refs/heads/master"},"workspace":{"root":"/drone/src","path":"/drone/src/github.com/drone/drone"},"vargs":{"build":"","repo":"","access_key":"AKIAGDHD65JEJZU6NA","secret_key":"JHGDjhgsd78678hjgdjgTYRT6467582kjhDkhmF","region":"ap-southeast-2","family":"CoreProduction-DashboardTaskDefinition","cluster":"CoreProduction-ServicesCluster","service":"CoreProduction-DashboardService","constainer_name":"dashboard","allow_multiple_clusters":false,"allow_multiple_services":false,"image_name":"registry.mydomain.com.au/dashboard-development","image_tag":"1.0.1","log_level":"debug","task_definition":null, "desired_count": 2, "deployment_configuration":{"maximum_percent": 200, "minimum_healthy_percent": 0}, "disable_dry_run":false}}' +node app.js -- '{"repo":{"clone_url":"git://github.com/drone/drone","owner":"drone","name":"drone","full_name":"drone/drone"},"system":{"link_url":"https://beta.drone.io"},"build":{"number":22,"status":"success","started_at":1421029603,"finished_at":1421029813,"message":"UpdatetheReadme","author":"johnsmith","author_email":"john.smith@gmail.com","event":"push","branch":"master","commit":"436b7a6e2abaddfd35740527353e78a227ddcb2c","ref":"refs/heads/master"},"workspace":{"root":"/drone/src","path":"/drone/src/github.com/drone/drone"},"vargs":{"build":"","repo":"","access_key":"AKIAGDHD65JEJZU6NA","secret_key":"JHGDjhgsd78678hjgdjgTYRT6467582kjhDkhmF","region":"ap-southeast-2","family":"CoreProduction-DashboardTaskDefinition","cluster":"CoreProduction-ServicesCluster","service":"CoreProduction-DashboardService","constainer_names":["dashboard"],"allow_multiple_clusters":false,"allow_multiple_services":false,"image_name":"registry.mydomain.com.au/dashboard-development","image_tag":"1.0.1","log_level":"debug","task_definition":null, "desired_count": 2, "deployment_configuration":{"maximum_percent": 200, "minimum_healthy_percent": 0}, "disable_dry_run":false}}' Friendly version ``` @@ -68,7 +68,7 @@ Friendly version "family": "Development-DashboardTaskDefinition", "cluster": "Development-ServicesCluster", "service": "Development-DashboardService", - "constainer_name": "dashboard", + "constainer_names": ["dashboard"], "allow_multiple_clusters": false, "allow_multiple_services": false, "image_name": "registry.mydomain.com.au/dashboard-development", diff --git a/app.js b/app.js index b85ce48..a5b06d7 100644 --- a/app.js +++ b/app.js @@ -478,9 +478,10 @@ ecsService.prototype = Object.create({ //need to handle multiple containers //which ones updated. //need to have the container passed in the vargs - for (var x=0; x