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

Deploy to demo #450

Merged
merged 8 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 4 additions & 22 deletions .github/workflows/_terraform-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ on:
deploy-env:
type: string
required: true
terraform_version:
description: Terraform version
required: false
default: "1.10.4"
type: string

env:
DEPLOY_ENV: ${{ inputs.deploy-env }}
Expand Down Expand Up @@ -44,7 +39,7 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
Expand All @@ -55,23 +50,10 @@ jobs:
- name: Install dependencies
run: pnpm install

- uses: actions/cache@v3
name: Check Cache for Terraform CLI
id: terraform-cache
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
path: /usr/local/bin/terraform
key: terraform-${{ inputs.terraform_version }}

- name: Install Terraform CLI
if: steps.terraform-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get update && sudo apt-get install -y wget unzip
wget https://releases.hashicorp.com/terraform/${{ inputs.terraform_version }}/terraform_${{ inputs.terraform_version }}_linux_amd64.zip
unzip terraform_${{ inputs.terraform_version }}_linux_amd64.zip
sudo mv terraform /usr/local/bin/

- name: Verify Terraform Installation
run: terraform --version
terraform_version: "1.10.4"

- name: Initialize Terraform CDK configuration
shell: bash
Expand Down
26 changes: 4 additions & 22 deletions .github/workflows/_terraform-plan-pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ on:
deploy-env:
required: true
type: string
terraform_version:
description: Terraform version
required: false
default: "1.10.4"
type: string

jobs:
terraform:
Expand Down Expand Up @@ -46,7 +41,7 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
Expand All @@ -57,23 +52,10 @@ jobs:
- name: Install dependencies
run: pnpm install

- uses: actions/cache@v3
name: Check Cache for Terraform CLI
id: terraform-cache
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
path: /usr/local/bin/terraform
key: terraform-${{ inputs.terraform_version }}

- name: Install Terraform CLI
if: steps.terraform-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get update && sudo apt-get install -y wget unzip
wget https://releases.hashicorp.com/terraform/${{ inputs.terraform_version }}/terraform_${{ inputs.terraform_version }}_linux_amd64.zip
unzip terraform_${{ inputs.terraform_version }}_linux_amd64.zip
sudo mv terraform /usr/local/bin/

- name: Verify Terraform Installation
run: terraform --version
terraform_version: "1.10.4"

- name: Initialize Terraform CDK configuration
shell: bash
Expand Down
27 changes: 4 additions & 23 deletions .github/workflows/_validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ on:
playwright_version:
description: Installed playwright version
required: false
default: "1.48.1"
type: string
terraform_version:
description: Terraform version
required: false
default: "1.10.4"
default: '1.50.0'
type: string

jobs:
Expand Down Expand Up @@ -74,7 +69,6 @@ jobs:
- name: Make directory for build artifacts
run: mkdir -p output/build-artifacts


- name: Spotlight app performance budget
run: pnpm --filter @atj/spotlight size:ci > output/build-artifacts/spotlight-size-output.txt

Expand All @@ -97,23 +91,10 @@ jobs:
shell: bash
run: AUTH_SECRET=not-super-secret pnpm test:ci

- uses: actions/cache@v3
name: Check Cache for Terraform CLI
id: terraform-cache
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
path: /usr/local/bin/terraform
key: terraform-${{ inputs.terraform_version }}

- name: Install Terraform CLI
if: steps.terraform-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get update && sudo apt-get install -y wget unzip
wget https://releases.hashicorp.com/terraform/${{ inputs.terraform_version }}/terraform_${{ inputs.terraform_version }}_linux_amd64.zip
unzip terraform_${{ inputs.terraform_version }}_linux_amd64.zip
sudo mv terraform /usr/local/bin/

- name: Verify Terraform Installation
run: terraform --version
terraform_version: '1.10.4'

- name: Initialize Terraform CDK configuration
shell: bash
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,8 @@ jobs:
app-name: server-doj
tag-name: ${{ github.ref_name }}

build-image-kansas:
uses: ./.github/workflows/_docker-build-image.yml
secrets: inherit
with:
app-name: server-kansas
tag-name: ${{ github.ref_name }}

deploy:
needs: [build-image-doj, build-image-kansas]
needs: [build-image-doj]
uses: ./.github/workflows/_terraform-apply.yml
secrets: inherit
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
_site
.turbo/
.vscode/
.idea/
coverage/
html/
node_modules/
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
pnpm lint
pnpm format
pnpm test
pnpm test:ci
1 change: 0 additions & 1 deletion apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"test": "vitest run --coverage"
},
"dependencies": {
"@atj/dependency-graph": "workspace:*",
"@atj/infra-core": "workspace:*",
"commander": "^11.1.0"
}
Expand Down
9 changes: 0 additions & 9 deletions apps/cli/src/cli-controller/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Command } from 'commander';

import { createDependencyGraph } from '@atj/dependency-graph';
import type { Context } from './types.js';
import { addSecretCommands } from './secrets.js';

Expand All @@ -16,14 +15,6 @@ export const CliController = (ctx: Context) => {
ctx.console.log('Hello!');
});

cli
.command('create-workspace-graph')
.description('create a dependency graph of projects in the workspace')
.action(async () => {
await createDependencyGraph(ctx.workspaceRoot);
ctx.console.log('wrote workspace dependency graph');
});

addSecretCommands(ctx, cli);

return cli;
Expand Down
1 change: 1 addition & 0 deletions apps/server-doj/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const createCustomServer = async (db: DatabaseContext): Promise<any> => {
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
// DOJ test users
'[email protected]',
'[email protected]',
Expand Down
2 changes: 0 additions & 2 deletions apps/server-kansas/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions apps/server-kansas/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions apps/server-kansas/package.json

This file was deleted.

22 changes: 0 additions & 22 deletions apps/server-kansas/src/index.ts

This file was deleted.

26 changes: 0 additions & 26 deletions apps/server-kansas/src/server.ts

This file was deleted.

15 changes: 0 additions & 15 deletions apps/server-kansas/tests/integration.test.ts

This file was deleted.

12 changes: 0 additions & 12 deletions apps/server-kansas/tsconfig.json

This file was deleted.

4 changes: 2 additions & 2 deletions e2e/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# base image with Node.js and playwright preinstalled
FROM mcr.microsoft.com/playwright:v1.48.1-noble as base
FROM mcr.microsoft.com/playwright:v1.50.0-noble as base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
ENV NODE_ENV=test
RUN apt-get -y update && apt-get install -y netcat-openbsd
RUN apt-get -y update && apt-get install -y netcat-openbsd make g++
WORKDIR /srv/apps/atj-platform
COPY ./pnpm-lock.yaml ./pnpm-lock.yaml
COPY ./package.json ./package.json
Expand Down
1 change: 0 additions & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"test": "export E2E_ENDPOINT=http://localhost:4321; pnpm playwright test --ui-port=8080 --ui-host=0.0.0.0"
},
"devDependencies": {
"@playwright/test": "1.48.1",
"@storybook/test-runner": "^0.19.1",
"path-to-regexp": "^8.2.0"
},
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
"lint": "turbo run lint",
"pages": "rm -rf node_modules && npm i -g pnpm turbo && pnpm i && pnpm build && ln -sf ./apps/spotlight/dist _site",
"test": "vitest run",
"test:ci": "vitest run # --coverage.enabled --coverage.provider=v8 --coverage.reporter=text --coverage.reporter=json-summary --coverage.reporter=json --coverage.reportOnFailure",
"test:ci": "CI=true vitest run # --coverage.enabled --coverage.provider=v8 --coverage.reporter=text --coverage.reporter=json-summary --coverage.reporter=json --coverage.reportOnFailure",
"test:infra": "turbo run --filter=infra-cdktf test",
"typecheck": "tsc --build",
"typecheck": "tsc --build --noEmit",
"prepare": "husky"
},
"hooks": {
"pre-commit": "pnpm format"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
"@playwright/test": "^1.50.0",
"@rollup/plugin-commonjs": "^28.0.2",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.0",
Expand Down
7 changes: 0 additions & 7 deletions packages-python/docassemble-server/Dockerfile

This file was deleted.

11 changes: 0 additions & 11 deletions packages-python/docassemble-server/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions packages-python/docassemble-server/docker-compose.yml

This file was deleted.

Loading