-
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 'feature/EASI-4614_grb_discussions' into EASI-4658/integ…
…rate-tagging-discussions
- Loading branch information
Showing
49 changed files
with
1,824 additions
and
739 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Build easi-frontend image | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
GIT_HASH: ${{ github.sha }} | ||
GIT_REF_NAME: ${{ github.ref }} | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build_easi-frontend_image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4.0.2 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_INFRA_OIDC_ROLE_TO_ASSUME }} | ||
aws-region: us-west-2 | ||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v2 | ||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Set env vars with direnv # This allows docker build of FE files to pull from .envrc | ||
uses: HatsuneMiku3939/direnv-action@v1 | ||
- name: Calculate build args | ||
id: calculate-build-args | ||
run: | | ||
echo "VITE_LD_CLIENT_ID=${VITE_LD_CLIENT_ID}" >> $GITHUB_OUTPUT | ||
echo "VITE_OKTA_CLIENT_ID=${VITE_OKTA_CLIENT_ID}" >> $GITHUB_OUTPUT | ||
echo "VITE_OKTA_SERVER_ID=${VITE_OKTA_SERVER_ID}" >> $GITHUB_OUTPUT | ||
echo "VITE_OKTA_ISSUER=${VITE_OKTA_ISSUER}" >> $GITHUB_OUTPUT | ||
echo "VITE_OKTA_DOMAIN=${VITE_OKTA_DOMAIN}" >> $GITHUB_OUTPUT | ||
echo "VITE_OKTA_REDIRECT_URI=${VITE_OKTA_REDIRECT_URI}" >> $GITHUB_OUTPUT | ||
- name: Build, tag, and push image to Amazon ECR | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: Dockerfile.frontend_k8s | ||
push: true | ||
cache-to: type=gha,mode=max,scope=${{ env.GIT_REF_NAME }}-easi-frontend | ||
cache-from: type=gha,scope=${{ env.GIT_REF_NAME }}-easi-frontend | ||
tags: ${{ steps.login-ecr.outputs.registry }}/easi-frontend:${{ env.GIT_HASH }} | ||
build-args: | | ||
VITE_LD_CLIENT_ID=${{ steps.calculate-build-args.outputs.VITE_LD_CLIENT_ID }} | ||
VITE_OKTA_CLIENT_ID=${{ steps.calculate-build-args.outputs.VITE_OKTA_CLIENT_ID }} | ||
VITE_OKTA_SERVER_ID=${{ steps.calculate-build-args.outputs.VITE_OKTA_SERVER_ID }} | ||
VITE_OKTA_ISSUER=${{ steps.calculate-build-args.outputs.VITE_OKTA_ISSUER }} | ||
VITE_OKTA_DOMAIN=${{ steps.calculate-build-args.outputs.VITE_OKTA_DOMAIN }} | ||
VITE_OKTA_REDIRECT_URI=${{ steps.calculate-build-args.outputs.VITE_OKTA_REDIRECT_URI }} |
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,36 @@ | ||
name: Manual deploy To EKS | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
namespace: | ||
required: false | ||
type: string | ||
description: 'The namespace to use when deploying to EKS. If not passed, a namespace will attempt to be automatically generated from the branch name.' | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
env: | ||
EASI_APP_NODE_VERSION: "18.20.4" | ||
GIT_HASH: ${{ github.sha }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
GIT_REF_NAME: ${{ github.ref }} | ||
|
||
jobs: | ||
|
||
Build_easi-frontend_image: | ||
uses: ./.github/workflows/build_frontend_image.yml | ||
secrets: inherit | ||
|
||
Build_Application_Images: | ||
uses: ./.github/workflows/build_application_images.yml | ||
secrets: inherit | ||
|
||
Deploy_to_EKS: | ||
needs: [Build_easi-frontend_image, Build_Application_Images] | ||
uses: ./.github/workflows/deploy_to_eks.yml | ||
secrets: inherit | ||
with: | ||
namespace: ${{ github.event.inputs.namespace }} |
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: Teardown branch environment in EKS on PR close | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
env: | ||
GIT_HASH: ${{ github.sha }} | ||
GIT_REF_NAME: ${{ github.ref }} | ||
PR_NUMBER: ${{ github.event.number }} | ||
|
||
jobs: | ||
Teardown_env: | ||
name: Teardown EKS branch environment | ||
runs-on: ubuntu-latest | ||
environment: "dev" | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4.0.2 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_OIDC_ROLE_TO_ASSUME }} | ||
aws-region: us-west-2 | ||
- name: Update kubeconfig | ||
run: aws eks update-kubeconfig --name dev-easi-poc-cluster --region us-west-2 | ||
- name: Teardown branch environment | ||
# The "easi-pr-" prefix needs to match the prefix in build_and_test.yml so that we delete the correct namespace | ||
run: | | ||
kubectl delete namespace "easi-$PR_NUMBER" --force --ignore-not-found |
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
Oops, something went wrong.