Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for release 1.1.0 #926

Merged
merged 21 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
98f4962
Github action for cloud code checks (#816)
chriswilty Feb 5, 2024
ee23b42
385: CDK API stack with Fargate / ALB (#817)
chriswilty Feb 13, 2024
94688aa
807: CDK auth stack (AWS Cognito) (#818)
chriswilty Feb 13, 2024
7bd3b5b
388: Add UI stack and hook up CORS origin (#819)
chriswilty Feb 13, 2024
ec3e89c
385: Put APIGateway in front of private loadbalancer (#834)
chriswilty Feb 20, 2024
2cd139a
Start/stop fargate service at start/end of day (#854)
chriswilty Mar 6, 2024
d30d47b
807: Authentication for UI in production mode (#851)
chriswilty Mar 6, 2024
bb850e5
806, 809: Route 53 and Certificates for spylogic.ai (#860)
chriswilty Mar 15, 2024
2f5a9dc
808: Authenticate backend via cloudfront function (#904)
chriswilty Apr 25, 2024
0c9d4ec
909: Enable SSO Sign-in in cloud templates and (opt-in) in UI (#910)
chriswilty May 3, 2024
64d4caf
Prepare for prod-stage deployments (#914)
chriswilty Jul 3, 2024
bc1fc58
Switch to Linux2023 AMI for NAT instance
chriswilty Jul 16, 2024
5c3e3cc
Add pipeline for deployment on push
chriswilty Jul 22, 2024
7c68404
Add another CDK app to test synth and deploy
chriswilty Jul 26, 2024
c3f21f0
Correct auth header generation, read ParameterStore region from env
chriswilty Aug 9, 2024
5757472
Assign least-privilege IAM policies to pipeline
chriswilty Sep 11, 2024
9b8dde9
Make SSO login in UI opt-in: only basic by default
chriswilty Sep 13, 2024
1716741
Add a confirmation step to pipeline for permissions broadening
chriswilty Sep 25, 2024
d19c420
Reset pipeline trigger to main branch, ready for merge
chriswilty Oct 21, 2024
d84a307
Merge pull request #921 from ScottLogic/feature/aws-cloud-infrastructure
chriswilty Oct 23, 2024
501e4be
Prepare for release 1.1.0 (#925)
chriswilty Oct 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
**/dist/
**/test/
**/jest*
**/tsconfig.test.json
**/vitest*
**/.env*
**/.eslint*
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/backend-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- main
- dev
- 'feature/**'
paths:
- 'backend/**'

Expand All @@ -20,7 +21,6 @@ jobs:
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -30,19 +30,21 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "./backend/package-lock.json"
cache: 'npm'
cache-dependency-path: './backend/package-lock.json'
- name: Install dependencies
run: |
npm ci --no-audit
- name: Run job
run: |
npm ci
npx eslint .
npx prettier . --check

build-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x ]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -52,10 +54,12 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "./backend/package-lock.json"
cache: 'npm'
cache-dependency-path: './backend/package-lock.json'
- name: Install dependencies
run: |
npm ci --no-audit
- name: Run job
run: |
npm ci
npm run build
npm test
41 changes: 41 additions & 0 deletions .github/workflows/cloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Cloud Code Checks

on:
workflow_dispatch:
pull_request:
branches:
- main
- dev
- 'feature/**'
paths:
- 'cloud/**'

defaults:
run:
working-directory: ./cloud

jobs:
lint-format:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
sparse-checkout: |
.prettierrc
cloud
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: './cloud/package-lock.json'
- name: Install dependencies
run: |
npm ci --no-audit
- name: Run job
run: |
npm run codecheck
20 changes: 12 additions & 8 deletions .github/workflows/frontend-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- main
- dev
- 'feature/**'
paths:
- 'frontend/**'

Expand All @@ -20,7 +21,6 @@ jobs:
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -30,20 +30,22 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "./frontend/package-lock.json"
cache: 'npm'
cache-dependency-path: './frontend/package-lock.json'
- name: Install dependencies
run: |
npm ci --no-audit
- name: Run job
run: |
npm ci
npx eslint .
npx stylelint '**/*.css'
npx prettier . --check

build-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x ]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -53,10 +55,12 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "./frontend/package-lock.json"
cache: 'npm'
cache-dependency-path: './frontend/package-lock.json'
- name: Install dependencies
run: |
npm ci --no-audit
- name: Run job
run: |
npm ci
npm run build
npm test
9 changes: 5 additions & 4 deletions .github/workflows/k6-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -30,10 +29,12 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "./k6/package-lock.json"
cache: 'npm'
cache-dependency-path: './k6/package-lock.json'
- name: Install dependencies
run: |
npm ci --no-audit
- name: Run job
run: |
npm ci
npx eslint .
npx prettier . --check
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ pids
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
# Coverage and test output
lib-cov
coverage
*.lcov
reports

# node-waf configuration
.lock-wscript
Expand Down
1 change: 1 addition & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
build
reports
test
.env*
.eslintrc.cjs
Expand Down
2 changes: 1 addition & 1 deletion backend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json', './test/tsconfig.json'],
project: ['./tsconfig.json', 'test/tsconfig.json'],
},
plugins: ['@typescript-eslint', 'jest'],
ignorePatterns: ['build', 'coverage', 'node_modules'],
Expand Down
1 change: 0 additions & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM node:lts-alpine
ENV NODE_ENV=production

WORKDIR /usr/app
COPY package*.json ./
Expand Down
2 changes: 1 addition & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# prompt-injection-api
# SpyLogic : API

This is the backend module of the SpyLogic app. We are using [Express](https://expressjs.com/) to serve the API.

Expand Down
9 changes: 6 additions & 3 deletions backend/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ const jestConfig: JestConfigWithTsJest = {
'^@src/(.*)': '<rootDir>/src/$1',
importMetaUtils$: '<rootDir>/test/importMetaUtils.mock.ts',
},
modulePathIgnorePatterns: ['build', 'coverage', 'node_modules'],
testEnvironment: 'node',
transform: {
'^.+\\.ts$': [
'ts-jest',
{
tsconfig: './test/tsconfig.json',
tsconfig: '<rootDir>/test/tsconfig.json',
useESM: true,
},
],
},
silent: true,
setupFiles: ['./test/setupEnvVars.ts'],
setupFiles: ['<rootDir>/test/setupEnvVars.ts'],
reporters:
process.env.CI === 'true'
? ['default', ['jest-junit', { outputDirectory: 'reports' }]]
: ['default'],
};

export default jestConfig;
Loading
Loading