From 966d50e98555c9d71e288992fff189793f4f0037 Mon Sep 17 00:00:00 2001 From: Diego Cohen Date: Tue, 10 Sep 2024 10:22:51 -0400 Subject: [PATCH] Remove travis yml --- .github/workflows/deploy_qa.yml | 12 +++---- .travis.yml | 63 --------------------------------- 2 files changed, 5 insertions(+), 70 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/deploy_qa.yml b/.github/workflows/deploy_qa.yml index 07d0ad13d..7a5d5ad45 100644 --- a/.github/workflows/deploy_qa.yml +++ b/.github/workflows/deploy_qa.yml @@ -5,7 +5,6 @@ on: push: branches: - qa - - SCC-4218/move-rc-from-travis-to-github-actions permissions: id-token: write @@ -13,8 +12,7 @@ permissions: env: AWS_DEFAULT_REGION: us-east-1 - # LOCAL_TAG_NAME: research-catalog:${{ github.ref_name }}-${{ github.run_number }} - LOCAL_TAG_NAME: research-catalog:test-${{ github.run_number }} + LOCAL_TAG_NAME: research-catalog:${{ github.ref_name }}-${{ github.run_number }} jobs: deploy: @@ -43,8 +41,8 @@ jobs: docker tag $LOCAL_TAG_NAME $ECR_URL aws ecr batch-delete-image --repository-name research-catalog --image-ids imageTag="qa-previous" || true aws ecr put-image --repository-name research-catalog --image-tag "qa-previous" --image-manifest "$MANIFEST" || true - # docker push $ECR_URL + docker push $ECR_URL - # - name: Update ECS service - # run: | - # aws ecs update-service --cluster research-catalog-qa --service research-catalog-qa --force-new-deployment + - name: Update ECS service + run: | + aws ecs update-service --cluster research-catalog-qa --service research-catalog-qa --force-new-deployment diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a4f042c26..000000000 --- a/.travis.yml +++ /dev/null @@ -1,63 +0,0 @@ -dist: xenial -language: ruby - -services: - - docker - -branches: - only: - - qa - - production - -jobs: - include: - - stage: docker build - if: (branch = qa or branch = production) - before_install: - - if [[ $TRAVIS_BRANCH == "qa" ]]; - then - export NEXT_PUBLIC_APP_ENV="qa"; - fi - - if [[ "$TRAVIS_BRANCH" == "production" ]]; - then - export NEXT_PUBLIC_APP_ENV="production"; - fi - env: - - ECR_URL=946183545209.dkr.ecr.us-east-1.amazonaws.com/research-catalog - - AWS_DEFAULT_REGION=us-east-1 - - AWS_REGION=us-east-1 - install: - - pip install --user awscli - - export LOCAL_TAG_NAME="${NEXT_PUBLIC_APP_ENV}-latest" - script: - - eval $(aws ecr get-login --no-include-email --region us-east-1) - - docker build -t "$LOCAL_TAG_NAME" --build-arg NEXT_PUBLIC_APP_ENV="${NEXT_PUBLIC_APP_ENV}" . - - docker tag "$LOCAL_TAG_NAME" "$ECR_URL:$LOCAL_TAG_NAME" - # Re-tag last latest image just in case - - | - MANIFEST=$(aws ecr batch-get-image --repository-name research-catalog --image-ids imageTag="$NEXT_PUBLIC_APP_ENV-latest" --output json | jq --raw-output --join-output '.images[0].imageManifest') - aws ecr batch-delete-image --repository-name research-catalog --image-ids imageTag="$NEXT_PUBLIC_APP_ENV-previous" || true - aws ecr put-image --repository-name research-catalog --image-tag "$NEXT_PUBLIC_APP_ENV-previous" --image-manifest "$MANIFEST" || true - - docker push "$ECR_URL:$LOCAL_TAG_NAME" - - - stage: deploy qa - if: branch IN (qa) AND type != pull_request - env: - - AWS_DEFAULT_REGION=us-east-1 - - AWS_REGION=us-east-1 - - CLUSTER_NAME=research-catalog-qa - install: - - pip install --user awscli - script: - - aws ecs update-service --cluster $CLUSTER_NAME --service $CLUSTER_NAME --force-new-deployment - - - stage: deploy production - if: branch IN (production) AND type != pull_request - env: - - AWS_DEFAULT_REGION=us-east-1 - - AWS_REGION=us-east-1 - - CLUSTER_NAME=research-catalog-production - install: - - pip install --user awscli - script: - - aws ecs update-service --cluster $CLUSTER_NAME --service $CLUSTER_NAME --force-new-deployment