Skip to content

Commit

Permalink
Merge pull request #75 from veezor/add-maestro-repo-override-variable
Browse files Browse the repository at this point in the history
Add new environment variable
  • Loading branch information
MatheusdeMelo authored Jul 12, 2023
2 parents 6316bb9 + 020be7a commit 2f00e61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Variable | Description | Examples/Values | Default
`ECS_SERVICE_TASK_PROCESSES` | Processes intended to have a service to be created according to Procfile <br><br> *Multiple services can be assigned using comma as separator* <br> <br> *For CPU and RAM assignment use semicolon as separator and curly brackets as container* <br> *For number of tasks assignment use colon as separator and a dash between numbers to define max task auto scaling value* <br> *For CPU and RAM usage percentage and ALB request count auto scaling triggers assignment use semicolon as separator and square brackets as container* | `web` <br> `web,worker` <br> `web{1024;2048}:2-5[mem=55;cpu=60;alb=1000]` <br> `web{512;1024}:2,worker{1024;2048}:1-3` <br><br> Add `scheduledtasks{256;512}` process to be able to create Scheduled Tasks. Does not create an ECS service, only enables the feature <br><br> `<process>{<v-cpus>;<mem>}:<min_tasks>-<max_tasks>[<mem=percent>;<cpu=percent>]` <br><br> `<process>` = Process name <br> `<v-cpus>` = Desired number of v-cpus per task x1024 <br> `<mem>` = Desired allocated MB of RAM per task <br> `<min_tasks>` = Minimum amount of tasks per process, can be used without a max value so as to not use auto scaling <br> `<max_tasks>` = Maximum amount of tasks per process <br> `<mem=percent>`= RAM usage percentage auto scaling trigger <br> `<cpu=percent>` = CPU usage percentage auto scaling trigger <br> `<alb=requestcount>` = Load Balancer request count auto scaling trigger <br><br> Example using all default values except for `Tasks per Process`: <br> `test:2-5,scheduledtasks` <br> Fully disclosed example would be: <br> `test{512;512}:2-5[cpu=55],scheduledtasks{256;512}` | `<v-cpus>` = 512 <br> `<mem>` = 512 <br> `<min_tasks>` = 1 <br> `<cpu=percent>` = 55 (if auto scaling is active) <br><br> `scheduledtasks <v-cpus>` = 256 <br> `scheduledtasks <mem>` = 512
`ECS_TASK_ROLE_ARN` | IAM Role ARN linked to ECS Task | `arn:aws:iam::0123456789:role/<role-name>`
`MAESTRO_BRANCH_OVERRIDE` | Temporary overriding of the working branch | `staging` <br> `production`
`MAESTRO_REPO_OVERRIDE` | Temporary overriding of the repo name
`MAESTRO_DEBUG` | Amplify verbosity of the build <br><br> **Choose only one of the example values** | `true` <br> `false`
`MAESTRO_NO_CACHE` | If the cache layer shouldn't be used in the pack build <br><br> **Choose only one of the example values** | `true` <br> `false`
`MAESTRO_ONLY_BUILD` | Stops after build if `true`, leave empty otherwise | `true`
Expand Down
4 changes: 4 additions & 0 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

set -eo pipefail

if [ ! -z "$MAESTRO_REPO_OVERRIDE" ]; then
REPO_SLUG=$MAESTRO_REPO_OVERRIDE
fi

if [ -z "$REPO_SLUG" ]; then
REPO_SLUG=${CODEBUILD_SOURCE_REPO_URL#*://*/}
REPO_SLUG=${REPO_SLUG,,}
Expand Down

0 comments on commit 2f00e61

Please sign in to comment.