diff --git a/README.md b/README.md index 72d664f..cf9c8c3 100644 --- a/README.md +++ b/README.md @@ -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

*Multiple services can be assigned using comma as separator*

*For CPU and RAM assignment use semicolon as separator and curly brackets as container*
*For number of tasks assignment use colon as separator and a dash between numbers to define max task auto scaling value*
*For CPU and RAM usage percentage and ALB request count auto scaling triggers assignment use semicolon as separator and square brackets as container* | `web`
`web,worker`
`web{1024;2048}:2-5[mem=55;cpu=60;alb=1000]`
`web{512;1024}:2,worker{1024;2048}:1-3`

Add `scheduledtasks{256;512}` process to be able to create Scheduled Tasks. Does not create an ECS service, only enables the feature

`{;}:-[;]`

`` = Process name
`` = Desired number of v-cpus per task x1024
`` = Desired allocated MB of RAM per task
`` = Minimum amount of tasks per process, can be used without a max value so as to not use auto scaling
`` = Maximum amount of tasks per process
``= RAM usage percentage auto scaling trigger
`` = CPU usage percentage auto scaling trigger
`` = Load Balancer request count auto scaling trigger

Example using all default values except for `Tasks per Process`:
`test:2-5,scheduledtasks`
Fully disclosed example would be:
`test{512;512}:2-5[cpu=55],scheduledtasks{256;512}` | `` = 512
`` = 512
`` = 1
`` = 55 (if auto scaling is active)

`scheduledtasks ` = 256
`scheduledtasks ` = 512 `ECS_TASK_ROLE_ARN` | IAM Role ARN linked to ECS Task | `arn:aws:iam::0123456789:role/` `MAESTRO_BRANCH_OVERRIDE` | Temporary overriding of the working branch | `staging`
`production` + `MAESTRO_REPO_OVERRIDE` | Temporary overriding of the repo name `MAESTRO_DEBUG` | Amplify verbosity of the build

**Choose only one of the example values** | `true`
`false` `MAESTRO_NO_CACHE` | If the cache layer shouldn't be used in the pack build

**Choose only one of the example values** | `true`
`false` `MAESTRO_ONLY_BUILD` | Stops after build if `true`, leave empty otherwise | `true` diff --git a/main.sh b/main.sh index 71c6d3c..9a83ddb 100755 --- a/main.sh +++ b/main.sh @@ -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,,}