-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging staging branch into prod branch
- Loading branch information
Showing
16 changed files
with
394 additions
and
238 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
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 |
---|---|---|
|
@@ -16,9 +16,13 @@ permissions: | |
on: | ||
repository_dispatch: | ||
types: [rebuild-processing] | ||
workflow_call: | ||
|
||
jobs: | ||
rebuild-and-push-processing-image-dev: | ||
rebuild-and-push-processing-image: | ||
strategy: | ||
matrix: | ||
branch: [main, staging, prod] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Configure AWS Credentials | ||
|
@@ -31,66 +35,10 @@ jobs: | |
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ secrets.ECR_REPO }} | ||
- name: Checkout Dev (main) | ||
- name: Checkout ${{ matrix.branch }} | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
fetch-depth: 1 | ||
- name: Install happy | ||
uses: chanzuckerberg/github-actions/.github/actions/[email protected] | ||
with: | ||
happy_version: "0.110.1" | ||
- name: Docker build, push, and tag | ||
shell: bash | ||
run: | | ||
export BRANCH_SHA=$(git rev-parse --short=8 HEAD) | ||
happy push "" --aws-profile "" --tag sha-${BRANCH_SHA} --slice processing | ||
rebuild-and-push-processing-image-staging: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-region: us-west-2 | ||
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | ||
role-duration-seconds: 1800 | ||
- name: Login to ECR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ secrets.ECR_REPO }} | ||
- name: Checkout Staging | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: staging | ||
fetch-depth: 1 | ||
- name: Install happy | ||
uses: chanzuckerberg/github-actions/.github/actions/[email protected] | ||
with: | ||
happy_version: "0.110.1" | ||
- name: Docker build, push, and tag | ||
shell: bash | ||
run: | | ||
export BRANCH_SHA=$(git rev-parse --short=8 HEAD) | ||
happy push "" --aws-profile "" --tag sha-${BRANCH_SHA} --slice processing | ||
rebuild-and-push-processing-image-prod: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-region: us-west-2 | ||
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | ||
role-duration-seconds: 1800 | ||
- name: Login to ECR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ secrets.ECR_REPO }} | ||
- name: Checkout Prod | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: prod | ||
ref: ${{ matrix.branch }} | ||
fetch-depth: 1 | ||
- name: Install happy | ||
uses: chanzuckerberg/github-actions/.github/actions/[email protected] | ||
|
@@ -108,4 +56,4 @@ jobs: | |
fields: repo,eventName,workflow,job | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
if: always() # Pick up events even if the job fails or is canceled. | ||
if: matrix.branch == 'prod' && always() # Pick up events even if the job fails or is canceled. |
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 |
---|---|---|
|
@@ -18,101 +18,16 @@ on: | |
types: [schema-migration] | ||
|
||
jobs: | ||
rebuild-and-push-processing-image-dev: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-region: us-west-2 | ||
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | ||
role-duration-seconds: 1800 | ||
- name: Login to ECR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ secrets.ECR_REPO }} | ||
- name: Checkout Dev (main) | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
fetch-depth: 1 | ||
- name: Install happy | ||
uses: chanzuckerberg/github-actions/.github/actions/[email protected] | ||
with: | ||
happy_version: "0.110.1" | ||
- name: Docker build, push, and tag | ||
shell: bash | ||
run: | | ||
export BRANCH_SHA=$(git rev-parse --short=8 HEAD) | ||
happy push "" --aws-profile "" --tag sha-${BRANCH_SHA} --slice processing | ||
rebuild-and-push-processing-image-staging: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-region: us-west-2 | ||
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | ||
role-duration-seconds: 1800 | ||
- name: Login to ECR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ secrets.ECR_REPO }} | ||
- name: Checkout Staging | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: staging | ||
fetch-depth: 1 | ||
- name: Install happy | ||
uses: chanzuckerberg/github-actions/.github/actions/[email protected] | ||
with: | ||
happy_version: "0.110.1" | ||
- name: Docker build, push, and tag | ||
shell: bash | ||
run: | | ||
export BRANCH_SHA=$(git rev-parse --short=8 HEAD) | ||
happy push "" --aws-profile "" --tag sha-${BRANCH_SHA} --slice processing | ||
rebuild-and-push-processing-image-prod: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-region: us-west-2 | ||
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | ||
role-duration-seconds: 1800 | ||
- name: Login to ECR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ secrets.ECR_REPO }} | ||
- name: Checkout Prod | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: prod | ||
fetch-depth: 1 | ||
- name: Install happy | ||
uses: chanzuckerberg/github-actions/.github/actions/[email protected] | ||
with: | ||
happy_version: "0.110.1" | ||
- name: Docker build, push, and tag | ||
shell: bash | ||
run: | | ||
export BRANCH_SHA=$(git rev-parse --short=8 HEAD) | ||
happy push "" --aws-profile "" --tag sha-${BRANCH_SHA} --slice processing | ||
- name: Alert in Slack | ||
uses: 8398a7/action-slack@v3 | ||
with: | ||
status: ${{ job.status }} | ||
fields: repo,eventName,workflow,job | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
if: always() # Pick up events even if the job fails or is canceled. | ||
rebuild-processing-images: | ||
uses: ./.github/actions/rebuild-processing-images.yml | ||
secrets: | ||
ECR_REPO: ${{ secrets.ECR_REPO }} | ||
AWS_ROLE_TO_ASSUME: ${{ secrets.AWS_ROLE_TO_ASSUME }} | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
|
||
trigger-schema-migration: | ||
runs-on: ubuntu-22.04 | ||
needs: rebuild-and-push-processing-image-prod | ||
needs: rebuild-processing-images | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
|
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
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.