Skip to content

Commit

Permalink
bugfix: fix deploy target
Browse files Browse the repository at this point in the history
  • Loading branch information
YusufMavzer committed Nov 7, 2023
1 parent 990efab commit b056fc9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion polling-action/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.5
1.0.6
11 changes: 10 additions & 1 deletion polling-action/entrypoint.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@ else
deploy_target="$9"
fi

python3 /main.py --environment $1 --version $2 --status_url $3 --deploy_url $4 --access_key $5 --secret_key $6 --region $7 --interval $8 --deploy_target $deploy_target;
python3 ./main.py \
--environment "$1" \
--version "$2" \
--status_url "$3" \
--deploy_url "$4" \
--access_key "$5" \
--secret_key "$6" \
--region "$7" \
--interval "$8" \
--deploy_target "$deploy_target";
6 changes: 3 additions & 3 deletions polling-action/main.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
parser.add_argument('--secret_key', help='aws secret key', required=True)
parser.add_argument('-r','--region', help='region default: eu-west-1', default='eu-west-1')
parser.add_argument('-i','--interval', type=int, help='polling interval in seconds. default: 2', default=2)
parser.add_argument('--deploy_target', help='options ["none", "beanstalk", "ecs", "ecs_service", "agb_ecs_service", "ecs_scheduled_task"]', default='none')
parser.add_argument('-t','--deploy_target', help='options ["none", "beanstalk", "ecs", "ecs_service", "agb_ecs_service", "ecs_scheduled_task"]', default='none', required=False)
args = parser.parse_args()

status_responses = []
Expand Down Expand Up @@ -45,8 +45,8 @@ def sendBuildRequest():
"version":args.version
}

if args.deploy_target is not None and args.deploy_target != "none":
payload.deploy_target: args.deploy_target
if args.deploy_target != "none":
payload["deploy_target"]= args.deploy_target

aws_deploy_req_body = json.dumps(payload)

Expand Down

0 comments on commit b056fc9

Please sign in to comment.