From 63d9afb2828cd17a8a36b2de25acb1fa0c7deafd Mon Sep 17 00:00:00 2001 From: Jeff Croyle Date: Thu, 24 Oct 2024 16:36:13 -0400 Subject: [PATCH] remove travis deploys --- .travis.yml | 80 ----------------------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1e03d2021..000000000 --- a/.travis.yml +++ /dev/null @@ -1,80 +0,0 @@ -dist: focal -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 AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID_QA}; - export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY_QA}; - export ENV="qa"; - fi - - if [[ "$TRAVIS_BRANCH" == "production" ]]; - then - export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID_PRODUCTION}; - export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY_PRODUCTION}; - export ENV="production"; - fi - env: - - ECR_URL=946183545209.dkr.ecr.us-east-1.amazonaws.com/my-library-nyc-app - - AWS_DEFAULT_REGION=us-east-1 - - AWS_REGION=us-east-1 - install: - - pip install --user awscli - - export LOCAL_TAG_NAME="${ENV}-latest" - script: - - eval $(aws ecr get-login --no-include-email --region us-east-1) - - DOCKER_BUILDKIT=1 docker build -t "$LOCAL_TAG_NAME" --secret id=AWS_ACCESS_KEY_ID --secret id=AWS_SECRET_ACCESS_KEY --build-arg RAILS_ENV="${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 my-library-nyc-app --image-ids imageTag="$ENV-latest" --output json | jq --raw-output --join-output '.images[0].imageManifest') - aws ecr batch-delete-image --repository-name my-library-nyc-app --image-ids imageTag="$ENV-previous" || true - aws ecr put-image --repository-name my-library-nyc-app --image-tag "$ENV-previous" --image-manifest "$MANIFEST" - - docker push "$ECR_URL:$LOCAL_TAG_NAME" - - - stage: deploy qa - if: branch IN (qa) AND type != pull_request - env: - - AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_QA - - AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_QA - - AWS_DEFAULT_REGION=us-east-1 - - AWS_REGION=us-east-1 - - CLUSTER_NAME=mylibrarynycapp-qa - - DELAYED_JOB_NAME=mylibrarynycapp-qa-delayed-job - install: - - pip install --user awscli - script: - - aws ecs update-service --cluster $CLUSTER_NAME --service $CLUSTER_NAME --force-new-deployment - - aws ecs update-service --cluster $CLUSTER_NAME --service $DELAYED_JOB_NAME --force-new-deployment - - - stage: deploy production - if: branch IN (production) AND type != pull_request - env: - - AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_PRODUCTION - - AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_PRODUCTION - - AWS_DEFAULT_REGION=us-east-1 - - AWS_REGION=us-east-1 - - CLUSTER_NAME=mylibrarynycapp-production - - DELAYED_JOB_NAME=mylibrarynycapp-production-delayed-job - install: - - pip install --user awscli - script: - - aws ecs update-service --cluster $CLUSTER_NAME --service $CLUSTER_NAME --force-new-deployment - - aws ecs update-service --cluster $CLUSTER_NAME --service $DELAYED_JOB_NAME --force-new-deployment - -env: - global: - - secure: VmSPZTuC7ZMDSloA+sxYBa5MP2rchrlSVLvMU7yuEv9HI8tw4FxzUmex1IBUG976zMdsfjerjjGiXaJURC2xQqWUqoFEG3wsvEKEKo9ydMAaWDN8fvlX3aEkKoG7YoBmUozsOEn+SbGiEFg8ApdB9OwDoZ+tVhNKs8TPD8KfJX3ho7ER2FpvfNPtb3l+ZydYWWyHx/jw0aW4DVrRxHFY6Z/ELyNjaLte6ikh9kRjwNQ/Krmss8aU+k5PrFi4U1JocQEgbKXhR+Vej2ASjpb9KIS/c/EW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