-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'terraform' into update-apps
- Loading branch information
Showing
288 changed files
with
21,177 additions
and
1,815 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!-- Thank you for contributing the ADOT Community. Please note that as per policy, we're providing support via GitHub on a best effort basis. However, if you have AWS Enterprise Support you can create a ticket and we will provide direct support within the respective SLAs. --> |
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,49 @@ | ||
name: Deploy cdk infra | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: ['terraform'] | ||
# List of paths that should be considered when triggering the workflow | ||
paths: ['cdk_infra/**'] | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
concurrency: cdk_infra_deploy | ||
jobs: | ||
run-cdk-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1-node16 | ||
with: | ||
role-to-assume: ${{ secrets.TEST_FW_ASSUMABLE_ROLE_ARN }} | ||
aws-region: us-west-2 | ||
role-duration-seconds: 21600 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Get npm cache directory | ||
id: npm-cache-dir | ||
run: | | ||
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
id: npm-cache | ||
with: | ||
path: ${{ steps.npm-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: install cdk | ||
run: | | ||
npm install -g aws-cdk | ||
- name: npm install | ||
working-directory: cdk_infra | ||
run: | | ||
npm i | ||
- name: run cdk deploy | ||
working-directory: cdk_infra | ||
run: | | ||
make deploy-infra |
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,45 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: Centralized Sampling Integration Tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'centralized-sampling-tests/**' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
id-token: write | ||
|
||
jobs: | ||
run_tests: | ||
name: Run centralized sampling integration tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_CENTRALIZED_SAMPLING_ROLE }} | ||
role-duration-seconds: 1200 | ||
aws-region: us-west-2 | ||
- name: Build with Gradle Spring Boot App | ||
run: ./gradlew :centralized-sampling-tests:sample-apps:spring-boot:build | ||
- name: Build with Gradle Integration Tests | ||
run: ./gradlew :centralized-sampling-tests:integration-tests:build | ||
- name: Run test containers | ||
run: docker-compose up --abort-on-container-exit | ||
working-directory: centralized-sampling-tests | ||
env: | ||
INSTANCE_ID: ${{ github.run_id }}-${{ github.run_number }} | ||
LISTEN_ADDRESS: 0.0.0.0:8080 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This workflow will build a Java project with Gradle | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: PR Build | ||
on: | ||
pull_request: | ||
branches: | ||
- terraform | ||
- release/v* | ||
- dev/* | ||
|
||
jobs: | ||
validator-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew :validator:build | ||
go-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '~1.18.6' | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Unit test | ||
run: make go-test | ||
cdk-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Get npm cache directory | ||
id: npm-cache-dir | ||
run: | | ||
echo "::set-output name=dir::$(npm config get cache)" | ||
- uses: actions/cache@v3 | ||
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true' | ||
with: | ||
path: ${{ steps.npm-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: test | ||
working-directory: cdk_infra/ | ||
run: | | ||
npm install | ||
npm run 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Update Test Images | ||
|
||
# We should execute only one workflow run at a time | ||
concurrency: test_images_concurrency | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: ['terraform'] | ||
|
||
# List of paths that should be considered when triggering the workflow | ||
paths: ['mocked_servers/**', 'sample-apps/**'] | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
run-image-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1-node16 | ||
with: | ||
role-to-assume: ${{ secrets.TEST_FW_ASSUMABLE_ROLE_ARN }} | ||
aws-region: us-west-2 | ||
role-duration-seconds: 7200 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
- uses: gradle/wrapper-validation-action@v1 | ||
- name: Build locally with gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build | ||
- name: Set up terraform | ||
uses: hashicorp/setup-terraform@v2 | ||
- name: run imagebuild | ||
working-directory: terraform/imagebuild | ||
run: | | ||
terraform init && terraform apply --auto-approve |
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,20 @@ | ||
CMD_DIR := $(abspath ./cmd) | ||
ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort) | ||
|
||
GOTEST_OPT?= -short -coverprofile coverage.txt -v -race -timeout 180s | ||
GOTEST=go test | ||
|
||
build-aotutil: | ||
cd ${CMD_DIR}/aotutil && make build | ||
cd ${CMD_DIR}/aotutil && make build | ||
|
||
.PHONY: list-mod | ||
list-mod: | ||
@echo ${ALL_GO_SRC} | ||
|
||
.PHONY: go-test | ||
go-test: | ||
@set -e; for dir in $(ALL_GO_MOD_DIRS); do \ | ||
(cd "$${dir}" && \ | ||
go list ./... \ | ||
| xargs -n 10 $(GOTEST) $(GOTEST_OPT)) ; \ | ||
done |
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,3 @@ | ||
node_modules | ||
dist | ||
jest.config.js |
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,17 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-var-requires": 0, | ||
"eslint-disable no-undef": 0 | ||
} | ||
} | ||
|
Oops, something went wrong.