Skip to content

Commit

Permalink
Merge pull request #698 from Enterprise-CMCS/main
Browse files Browse the repository at this point in the history
Release to val
  • Loading branch information
mdial89f authored Aug 5, 2024
2 parents 1b9aa9a + d3d9ef2 commit 432594d
Show file tree
Hide file tree
Showing 779 changed files with 15,199 additions and 27,864 deletions.
1 change: 1 addition & 0 deletions .bun-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.1.20
4 changes: 3 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Set a project name. This value is used extensively in deployment for namespacing purposes.
# Once this value is set for a project, do not update it.
export PROJECT=om
export PROJECT=mako

# Define the regions for deployment
export REGION_A=us-east-1
Expand All @@ -23,3 +23,5 @@ use_nvm() {
}

use nvm

export TURBO_TELEMETRY_DISABLED=1
8 changes: 3 additions & 5 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ runs:
uses: HatsuneMiku3939/direnv-action@v1

- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Node cache
uses: actions/cache@v3
- uses: oven-sh/setup-bun@v2
with:
path: "**/node_modules"
key: ${{ github.workflow}}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock', '.nvmrc') }}
bun-version-file: ".bun-version"
2 changes: 1 addition & 1 deletion .github/workflows/auto-create-pr-val.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Create Release PR - val

on:
push:
branches: master
branches: main

jobs:
pull-request:
Expand Down
73 changes: 36 additions & 37 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,28 @@ jobs:
if [[ ! $STAGE_NAME =~ ^[a-z][a-z0-9-]*$ ]]; then
echo "ERROR: Your branch name, $STAGE_NAME, is not a valid Serverless Framework stage name." && exit 1
fi
cache:
runs-on: ubuntu-20.04
needs:
- init
environment:
name: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: ./.github/actions/setup

- run: run install
deploy:
runs-on: ubuntu-20.04
needs:
- cache
- init
environment:
name: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}
url: ${{ steps.deployment-data.outputs.APPURL }}
outputs:
app-url: ${{ steps.deployment-data.outputs.APPURL }}
kibana-url: ${{ steps.kibana-url.outputs.KIBANAURL }}
kibana-url: ${{ steps.deployment-data.outputs.KIBANAURL }}
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: ./.github/actions/setup

- uses: docker/setup-qemu-action@v2
with:
platforms: "amd64"

- uses: docker/setup-buildx-action@v2

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -67,25 +59,30 @@ jobs:
- name: Deploy
run: run deploy --stage $STAGE_NAME

- name: Set Site URL
- name: Set Application URLs
id: deployment-data
run: |
echo ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}
echo "APPURL=$(
aws cloudformation \
--region us-east-1 describe-stacks \
--stack-name $PROJECT-ui-infra-$STAGE_NAME \
--query Stacks[0].Outputs[0].OutputValue
)" | tr -d \'\" >> $GITHUB_OUTPUT
- name: Set Kibana URL
id: kibana-url
secret_value=$(aws ssm get-parameter \
--region us-east-1 \
--name "/$PROJECT/$STAGE_NAME/deployment-output" \
--query Parameter.Value \
--output text)
application_endpoint_url=$(echo $secret_value | jq -r '.applicationEndpointUrl')
echo "APPURL=$application_endpoint_url" >> $GITHUB_OUTPUT
kibana_url=$(echo $secret_value | jq -r '.kibanaUrl')
echo "KIBANAURL=$kibana_url" >> $GITHUB_OUTPUT
application-url:
runs-on: ubuntu-20.04
needs:
- deploy
environment:
name: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}-app
url: ${{ needs.deploy.outputs.app-url }}
steps:
- name: Display App URL
run: |
echo KIBANAURL=$(
sls info --verbose --stage $STAGE_NAME |& grep -m 1 OpenSearchDashboardEndpoint |
awk '{print $NF}' | awk '{$1=$1};1' |
tr -d \'\"
) >> $GITHUB_OUTPUT
echo "App URL: ${{ needs.deploy.outputs.app-url }}"
kibana-url:
runs-on: ubuntu-20.04
Expand All @@ -102,7 +99,7 @@ jobs:
test:
runs-on: ubuntu-20.04
needs:
- cache
- init
environment:
name: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}
steps:
Expand Down Expand Up @@ -142,8 +139,6 @@ jobs:
- deploy
environment:
name: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}
env:
baseurl: ${{ needs.deploy.outputs.app-url }}
if: ${{ github.ref != 'refs/heads/production' }}
steps:
- name: Checkout
Expand All @@ -162,7 +157,7 @@ jobs:
if: always()
with:
name: playwright-report
path: src/services/ui/playwright-report/
path: test/e2e/playwright-report/index.html
retention-days: 30

cfn-nag:
Expand Down Expand Up @@ -238,14 +233,18 @@ jobs:
runs-on: ubuntu-20.04
needs:
- test
- e2e
- cfn-nag
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: ./.github/actions/setup

- name: Install
run: bun install

- name: Release
run: npx semantic-release
run: bun semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
(
github.event.ref_type == 'branch' &&
(!startsWith(github.event.ref, 'skipci')) &&
(!contains(fromJson('["master", "staging", "production"]'), github.event.ref))
(!contains(fromJson('["main", "staging", "production"]'), github.event.ref))
) ||
(
inputs.environment != '' &&
(!contains(fromJson('["master", "staging", "production"]'), inputs.environment))
(!contains(fromJson('["main", "staging", "production"]'), inputs.environment))
)
runs-on: ubuntu-20.04
environment:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
types:
- completed
branches:
- master
- main
- val
- production
# Allows you to run this workflow manually from the Actions tab
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
ref: master
ref: main
- name: Setup Pages
uses: actions/configure-pages@v2
- uses: ./.github/actions/setup
Expand All @@ -55,17 +55,17 @@ jobs:
run: |
cd docs/_deploy-metrics
rm -rf node_modules
yarn install --frozen-lockfile
bun install
echo $BRANCHES_TO_GENERATE
- name: Build Deploy Metrics
run: |
cd docs/_deploy-metrics
yarn build
bun run build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
REPO_NAME: OneMAC
BRANCHES_TO_GENERATE: master,val
BRANCHES_TO_GENERATE: main,val
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
run: run install

- name: Run ESLint
run: yarn lint
run: bun lint
47 changes: 0 additions & 47 deletions .github/workflows/security-hub-jira-sync.yml

This file was deleted.

30 changes: 17 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
.idea/
.infra
*.js
!*config.js
node_modules
testcafe_results
.DS_Store
yarn-error.log
.serverless
.webpack

# CDK asset staging directory
.cdk.staging
cdk.out
cdk.context.json
.turbo
.yarn_install
tsconfig.tsbuildinfo
build_run
.build
.turbo
.build_run

# legacy ignores
.serverless
./src
.env*

# tests
coverage
lambda_layer.zip
**/.auth/*.json
.dccache
__snapshots__
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.ts
!*.d.ts

# CDK asset staging directory
.cdk.staging
cdk.out
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ repos:
rev: v4.0.1
hooks:
- id: check-added-large-files
exclude: "yarn.lock"
exclude: "bun.lockb"
- repo: https://github.com/Yelp/detect-secrets
rev: v1.1.0
hooks:
Expand Down
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
node_modules
testcafe_results
.DS_Store
yarn-error.log
.serverless
.webpack
.yarn_install
tsconfig.tsbuildinfo
build_run
docs/
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"recommendations": [
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"rvest.vs-code-prettier-eslint",
"ZixuanChen.vitest-explorer"
"rvest.vs-code-prettier-eslint"
]
}
Loading

0 comments on commit 432594d

Please sign in to comment.