Skip to content

Commit

Permalink
Merge pull request #98 from no10ds/release/7.11.0
Browse files Browse the repository at this point in the history
Release/7.11.0
  • Loading branch information
lcardno10 authored Sep 26, 2024
2 parents 90a0057 + 9fa1468 commit de97abc
Show file tree
Hide file tree
Showing 65 changed files with 1,249 additions and 1,843 deletions.
22 changes: 19 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
AWS_ACCOUNT=123456
AWS_REGION=eu-west-2

# API Specific
# API

## Application variables
ALLOWED_EMAIL_DOMAINS=example1.com,example2.com
DATA_BUCKET=the-bucket
RESOURCE_PREFIX=rapid
DOMAIN_NAME=example.com
COGNITO_USER_POOL_ID=11111111
LAYERS=raw,layer
CUSTOM_USER_NAME_REGEX="regex_expression"
# SDK Specific

## Build variables
ECS_SERVICE=rapid-ecs-service
ECS_CLUSTER=rapid-cluster
API_IMAGE_NAME=rapid

# SDK

RAPID_CLIENT_ID=
RAPID_CLIENT_SECRET=
RAPID_URL=
# UI Specific

# UI

## Application variables
NEXT_PUBLIC_API_URL=
NEXT_PUBLIC_API_URL_PROXY=

## Build variables
UI_IMAGE_NAME=rapid-image


# UI Specific for integration tests
DOMAIN=
RESOURCE_PREFIX=
5 changes: 5 additions & 0 deletions .github/.github.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ LAYERS=raw,layer
DOMAIN_NAME=example.com
DATA_BUCKET=the-bucket
CUSTOM_USER_NAME_REGEX=[a-zA-Z][a-zA-Z0-9@._-]{2,127}

ECS_SERVICE=rapid-preprod-ecs-service
ECS_CLUSTER=rapid-preprod-cluster
API_IMAGE_NAME=data-f1-registry
UI_IMAGE_NAME=ui-f1-registry
34 changes: 21 additions & 13 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,25 @@ jobs:
echo AWS_DEFAULT_REGION=${{ secrets.AWS_REGION }} >> .env
- name: Build API Image
run: make api-create-image
run: make api/create-image

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'

- name: Setup API environment
run: make api/setup

- name: API Static Analysis
run: make api-lint
run: make api/lint

- name: API Tests
run: make api-test
run: make api/test

- name: API Tag and Upload
run: make api-tag-and-upload
run: make api/tag-and-upload

sdk-dev:
needs:
Expand All @@ -84,18 +93,17 @@ jobs:

- name: Setup Python Environment
run: |
make sdk-setup
source sdk/.venv/bin/activate
make sdk/setup
- name: SDK Test
run: make sdk-test
run: make sdk/test

- name: Set env variable
run: echo "TEST_SDK_VERSION=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV

- name: SDK Test Deploy
run: make sdk-release-test
run: make sdk/release-test

ui-dev:
needs:
- setup
Expand All @@ -108,13 +116,13 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 19
node-version: 20

- name: Install UI Packages
run: make ui-setup
run: make ui/setup

- name: UI Test
run: make ui-test
run: make ui/test

cleanup:
needs:
Expand All @@ -130,4 +138,4 @@ jobs:

- name: Clean Docker Context
if: always()
run: make clean-pipeline-docker-context
run: make api/clean-docker
32 changes: 20 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,47 +49,55 @@ jobs:
echo AWS_DEFAULT_REGION=${{ secrets.AWS_REGION }} >> .env
- name: Build API Image
run: make api-create-image
run: make api/create-image

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'

- name: Setup API environment
run: make api/setup

- name: API Static Analysis
run: make api-lint
run: make api/lint

- name: API Tests
run: make api-test
run: make api/test

- name: API Tag and Upload
run: make api-tag-and-upload
run: make api/tag-and-upload

- name: API Check Image Scan for Vulnerabilities
run: make api-scan-for-vulns-and-tag
run: make api/scan-for-vulns-and-tag

- name: API Tag PROD Candidate
run: make api-tag-prod-candidate
run: make api/tag-prod-candidate

- name: API Deploy Image to Prod
run: make api-app-live-in-prod
run: make api/app-live-in-prod

- name: API Allow for Application to Start
run: sleep 120

- name: API Wait for Running Application
id: await-running-app
run: make api-check-app-is-running
run: make api/check-app-is-running

- name: API E2E Tests
id: e2e-tests
env:
E2E_DOMAIN_NAME: ${{ secrets.E2E_DOMAIN_NAME }}
E2E_DATA_BUCKET: ${{ secrets.E2E_DATA_BUCKET }}
E2E_RESOURCE_PREFIX: ${{ secrets.E2E_RESOURCE_PREFIX }}
run: |
# Export AWS credentials to env for e2e tests
eval "$(aws configure export-credentials --format env)"
make api-test-e2e
make api/test-e2e
- name: API Tag Image as Failure
if: always() && steps.await-running-app.conclusion == 'failure' || steps.e2e-tests.conclusion == 'failure'
run: make api-tag-prod-failure
run: make api/tag-prod-failure

cleanup:
needs:
Expand All @@ -103,4 +111,4 @@ jobs:

- name: Clean Docker Context
if: always()
run: make clean-pipeline-docker-context
run: make api/clean-docker
15 changes: 7 additions & 8 deletions .github/workflows/release_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
echo AWS_REGION=${{ secrets.AWS_REGION }} >> .env
- name: Build API Image
run: make api-create-image
run: make api/create-image

- name: API Tag and Upload Release Image
run: make api-tag-and-upload-release-image
run: make api/tag-and-upload-release-image

ui-release:
needs:
Expand All @@ -46,30 +46,29 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 19
node-version: 20

- name: Install UI Packages
run: make ui-setup
run: make ui/setup

- name: UI Build Static Files
run: make ui-create-static-out
run: make ui/create-static-out

- name: UI Zip and Release
env:
TAG: ${{ github.event.release.tag_name }}
GH_TOKEN: ${{ github.token }}
run: make ui-zip-and-release tag=$TAG
run: make ui/zip-and-release tag=$TAG

cleanup:
needs:
- setup
- api-release
- ui-release
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Clean Docker Context
if: always()
run: make clean-pipeline-docker-context
run: make api/clean-docker
18 changes: 2 additions & 16 deletions .github/workflows/release_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,7 @@ jobs:

- name: Setup Python Environment
run: |
make sdk-setup
source sdk/.venv/bin/activate
make sdk/setup
- name: SDK Release
run: make sdk-release

cleanup:
needs:
- setup
- sdk-release
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Clean Docker Context
if: always()
run: make clean-pipeline-docker-context
run: make sdk/release
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-vulnerability-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
run: echo AWS_REGION=${{ secrets.AWS_REGION }} >> .env

- name: Check for vulnerabilities
run: make api-scheduled-prod-scan
run: make api/scheduled-prod-scan
4 changes: 2 additions & 2 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 19
node-version: 20

- name: Install packages
run: |
Expand All @@ -31,7 +31,7 @@ jobs:
npx playwright install
- name: Run playwright tests
run: make ui-test-e2e
run: make ui/test-e2e
env:
E2E_DOMAIN_NAME: ${{ secrets.E2E_DOMAIN_NAME }}
E2E_RESOURCE_PREFIX: ${{ secrets.E2E_RESOURCE_PREFIX }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ venv/
ENV/
env.bak/
venv.bak/
.env.development

# Spyder project settings
.spyderproject
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
hooks:
- id: blacken-docs
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 7.0.0
hooks:
- id: flake8
args: ['--config', 'api/.flake8']
Expand Down
8 changes: 8 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
brew "pyenv"
brew "terraform"
brew "checkov"
brew "pre-commit"
brew "nvm"
brew "mkdocs"
brew "gh"
brew "jq"
Loading

0 comments on commit de97abc

Please sign in to comment.