-
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 pull request #344 from NYPL/qa
Merge qa into production for Bib Page deployment
- Loading branch information
Showing
56 changed files
with
1,499 additions
and
472 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,47 @@ | ||
# Deploys to research-catalog-production | ||
name: deploy production | ||
|
||
on: | ||
push: | ||
branches: | ||
- production | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
env: | ||
AWS_DEFAULT_REGION: us-east-1 | ||
LOCAL_TAG_NAME: research-catalog:${{ github.ref_name }}-${{ github.run_number }} | ||
ECR_URL: 946183545209.dkr.ecr.us-east-1.amazonaws.com/research-catalog:production-latest | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: arn:aws:iam::946183545209:role/GithubActionsDeployerRole | ||
aws-region: us-east-1 | ||
|
||
- name: Log in to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v2 | ||
|
||
- name: Build and push Docker image to Amazon ECR | ||
run: | | ||
docker build --build-arg NEXT_PUBLIC_APP_ENV=production --tag $LOCAL_TAG_NAME . | ||
docker tag $LOCAL_TAG_NAME $ECR_URL | ||
# Re-tag last latest image just in case | ||
MANIFEST=$(aws ecr batch-get-image --repository-name research-catalog --image-ids imageTag="production-latest" --output json | jq --raw-output --join-output '.images[0].imageManifest') | ||
aws ecr batch-delete-image --repository-name research-catalog --image-ids imageTag="production-previous" || true | ||
aws ecr put-image --repository-name research-catalog --image-tag "production-previous" --image-manifest "$MANIFEST" || true | ||
docker push $ECR_URL | ||
- name: Update ECS service | ||
run: | | ||
aws ecs update-service --cluster research-catalog-production --service research-catalog-production --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,48 @@ | ||
# Deploys to research-catalog-qa | ||
name: deploy qa | ||
|
||
on: | ||
push: | ||
branches: | ||
- qa | ||
- SCC-4218/move-rc-from-travis-to-github-actions | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
env: | ||
AWS_DEFAULT_REGION: us-east-1 | ||
LOCAL_TAG_NAME: research-catalog:${{ github.ref_name }}-${{ github.run_number }} | ||
ECR_URL: 946183545209.dkr.ecr.us-east-1.amazonaws.com/research-catalog:qa-latest | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: arn:aws:iam::946183545209:role/GithubActionsDeployerRole | ||
aws-region: us-east-1 | ||
|
||
- name: Log in to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v2 | ||
|
||
- name: Build and push Docker image to Amazon ECR | ||
run: | | ||
docker build --build-arg NEXT_PUBLIC_APP_ENV=qa --tag $LOCAL_TAG_NAME . | ||
docker tag $LOCAL_TAG_NAME $ECR_URL | ||
# Re-tag last latest image just in case | ||
MANIFEST=$(aws ecr batch-get-image --repository-name research-catalog --image-ids imageTag="qa-latest" --output json | jq --raw-output --join-output '.images[0].imageManifest') | ||
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 | ||
- name: Update ECS service | ||
run: | | ||
aws ecs update-service --cluster research-catalog-qa --service research-catalog-qa --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
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 |
---|---|---|
@@ -1 +1 @@ | ||
18 | ||
20 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:16-alpine AS production | ||
FROM node:20-alpine AS production | ||
|
||
#RUN apt-get update | ||
#RUN apt-get upgrade -y | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:16-alpine | ||
FROM node:20-alpine | ||
|
||
WORKDIR /app | ||
|
||
|
Oops, something went wrong.