From 1c3d15918d051830144ce03e6073690878aab1d6 Mon Sep 17 00:00:00 2001 From: Jianrong Date: Fri, 23 Sep 2022 11:57:26 +1000 Subject: [PATCH] add a single example of deployment via ECS to prove the whole CICD workflow works --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6ef580d7aa..560ceae54e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,8 +84,8 @@ jobs: - GO111MODULE=auto name: T-Z tests - - stage: (Devnet) Build and push image - if: branch = dev-upgrade + - stage: (Devnet) Build, push and deploy + if: branch = dev-upgrade AND type = push AND tag IS blank services: - docker install: skip @@ -97,4 +97,6 @@ jobs: - export PATH=$PATH:$HOME/.local/bin # put aws in the path - eval $(aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_BASE_URI > /dev/null 2>&1) #needs AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY envvars - docker tag xdc-devnet:latest $ECR_BASE_URI/$ECR_REPO_NAME:latest # Need ECR_REPO_NAME - - docker push $ECR_BASE_URI/$ECR_REPO_NAME:latest \ No newline at end of file + - docker push $ECR_BASE_URI/$ECR_REPO_NAME:latest + - aws ecs update-service --region us-east-1 --cluster devnet --service devnet-group-1 --force-new-deployment #TODO: Temporary solution until we have proper automated scripts ready + \ No newline at end of file