-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tiger-team-feature' into TGR-124-update-es-to-7.10
- Loading branch information
Showing
22 changed files
with
188 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Deploy Production | ||
on: | ||
workflow_run: | ||
workflows: ["CI"] | ||
types: | ||
- completed | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
deploy_production: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'production' }} | ||
name: Deploy Production | ||
runs-on: ubuntu-latest | ||
environment: production | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Configure AWS credentials for Production environment account | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: arn:aws:iam::946183545209:role/GithubActionsDeployerRole | ||
aws-region: us-east-1 | ||
|
||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
|
||
- name: Build, tag, and push image to Amazon ECR | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
ECR_REPOSITORY: my-library-nyc-app | ||
IMAGE_TAG: ${{ github.sha }} | ||
run: | | ||
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . | ||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | ||
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:production-latest | ||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:production-latest | ||
- name: Force ECS Update | ||
run: | | ||
aws ecs update-service --cluster mylibrarynycapp-production --service mylibrarynycapp-production --force-new-deployment | ||
aws ecs update-service --cluster mylibrarynycapp-production --service mylibrarynycapp-production-delayed-job --force-new-deployment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Deploy QA | ||
#on: | ||
# workflow_run: | ||
# workflows: ["CI"] | ||
# types: | ||
# - completed | ||
on: | ||
push: | ||
branches: | ||
- tiger-team-feature | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
deploy_qa: | ||
# if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'tiger-team-feature' }} | ||
name: Deploy QA | ||
runs-on: ubuntu-latest | ||
environment: qa | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Configure AWS credentials for QA environment account | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: arn:aws:iam::946183545209:role/GithubActionsDeployerRole | ||
aws-region: us-east-1 | ||
|
||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
|
||
- name: Build, tag, and push image to Amazon ECR | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
ECR_REPOSITORY: my-library-nyc-app | ||
IMAGE_TAG: ${{ github.sha }} | ||
run: | | ||
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . | ||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | ||
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:qa-latest | ||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:qa-latest | ||
- name: Force ECS Update | ||
run: | | ||
aws ecs update-service --cluster mylibrarynycapp-qa --service mylibrarynycapp-qa --force-new-deployment | ||
aws ecs update-service --cluster mylibrarynycapp-qa --service mylibrarynycapp-qa-delayed-job --force-new-deployment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- qa | ||
- production | ||
pull_request: | ||
branches: | ||
- qa | ||
- production | ||
|
||
jobs: | ||
build_and_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: set up docker | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: install docker compose | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y docker-compose | ||
- name: build application | ||
run: | | ||
docker-compose build | ||
- name: Run tests | ||
run: | | ||
docker-compose up -d | ||
docker-compose run webapp sh -c 'RAILS_ENV=test bundle exec rake db:create db:schema:load && RAILS_ENV=test bundle exec rails test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
LOCATION_CODE,LOCATION_NAME,PRIMARY_ADDRESS_LINE_1,STATE_CODE,PRINCIPAL_PHONE_NUMBER,Location 1 | ||
q373,United Charter High School for the Humanities lV,100-00 Beach Channel Drive,NY,"",100-00 Beach Channel Drive Queens NY 11694 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
zcode,sierra_code | ||
zq373,981 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class Nov2024Schools < ActiveRecord::Migration[7.0] | ||
def up | ||
Rake::Task['ingest:import_all_nyc_schools'].invoke('data/public/November_2024_schools_in_mln.csv', true) | ||
Rake::Task['ingest_sierra_data:import_sierra_codes_and_zcodes'].invoke('data/public/November_2024_sierra_codes_in_mln.csv', true) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.