Skip to content

Commit

Permalink
Checkout no merged changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MatheusdeMelo committed Jul 12, 2023
1 parent 559b91a commit 457a71a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ Variable | Description | Examples/Values | Default
`DEPLOYMENT_CIRCUIT_BREAKER_RULE` | Enable or disable circuit breaker | `enable=true,rollback=true`
`ECS_CONTAINER_STOP_TIMEOUT` | Set stopTimeout on taskdefinition | min: 0, max: 120, default: 30
`TZ`| Set this variable to the desired task timezone | America/Sao_Paulo
`WORKLOAD_PATH`| Set the workload path to run build commands on should do it | ./Projects/my-app, ./
### How to enable scheduled tasks
- Create a file tasks/run_tasks.conf with the schedules on your code:
Expand Down
13 changes: 2 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,12 @@ fi

if [ $(DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect $build_image_name 2> /dev/null ; echo $?) -eq 0 ]; then
echo "----> Skipping build as image already exists"
exit 0
fi

if [ -z "$WORKLOAD_PATH" ]; then
$WORKLOAD_PATH=.
fi

if [ -f "${WORKLOAD_PATH}/project.toml" ]; then
else
build_builder_name=`grep builder project.toml | cut -d= -f2 | tr -d '" '`
build_builder_tag=`echo $build_builder_name | tr /: -`
docker pull ${build_image_name%:*}:$build_builder_tag 2> /dev/null || true
docker tag ${build_image_name%:*}:$build_builder_tag $build_builder_name 2> /dev/null || true
build_assume_role=$(curl -s http://169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI)
build_assume_role=$(curl -s http://169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI)
echo "AWS_ACCESS_KEY_ID=$(jq -r '.AccessKeyId' <<<$build_assume_role)" >> .env
echo "AWS_SECRET_ACCESS_KEY=$(jq -r '.SecretAccessKey' <<<$build_assume_role)" >> .env
echo "AWS_SESSION_TOKEN=$(jq -r '.Token' <<<$build_assume_role)" >> .env
Expand All @@ -49,7 +42,6 @@ if [ -f "${WORKLOAD_PATH}/project.toml" ]; then
--env-file .env \
--publish \
--trust-builder \
--path ${WORKLOAD_PATH}
$( [[ -z $MAESTRO_NO_CACHE || $MAESTRO_NO_CACHE = "false" ]] && echo "--pull-policy if-not-present --cache-image ${build_image_name%:*}:cache") \
$( [ $MAESTRO_NO_CACHE = "true" ] && echo "--pull-policy always --clear-cache --env USE_YARN_CACHE=false --env NODE_MODULES_CACHE=false") \
$( [ $MAESTRO_DEBUG = "true" ] && echo "--env NPM_CONFIG_LOGLEVEL=debug --env NODE_VERBOSE=true --verbose")
Expand All @@ -58,7 +50,6 @@ fi

if [ -z "$build_built" && -f "${WORKLOAD_PATH}/Dockerfile" ]; then
docker build -t ${build_image_name%:*}:latest -t $build_image_name ${WORKLOAD_PATH}
build_built=true
fi

if [ -z "$build_built" ]; then
Expand Down

0 comments on commit 457a71a

Please sign in to comment.