Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2c46cdb
docs: update nx wrapper script documentation
webberwang Jul 4, 2025
b90823e
fix: terraform
webberwang Jul 4, 2025
4152e86
feat: implement git tag-based Docker versioning
webberwang Jul 5, 2025
bc641f9
fix: use relative path for validate-git-tag.sh in env.sh
webberwang Jul 5, 2025
5f7d86c
feat: enable infra-pr workflow for version tags
webberwang Jul 5, 2025
2e6fda5
feat: separate infra workflows for branches and tags
webberwang Jul 5, 2025
fcc7c9d
refactor: simplify version validation with JS script
webberwang Jul 5, 2025
1bce568
ci: parallelize Docker builds with terraform operations
webberwang Jul 5, 2025
f9bb872
refactor: root renderer
webberwang Jul 6, 2025
56f4ad0
refactor: rename and move page preview query
webberwang Jul 6, 2025
ddb11fa
feat: add environment variables and update Auth0 Terraform configurat…
webberwang Jul 10, 2025
8fba0ff
docs: add linting rules documentation to CLAUDE.md
webberwang Jul 10, 2025
7733218
feat: add sites components and update renderer with logging
webberwang Jul 10, 2025
e4a634f
fix(libs-frontend-application-renderer): use maybeCurrent for TypeRef…
webberwang Jul 10, 2025
abf28c8
fix(libs): add missing path mapping for page-preview use case
webberwang Jul 10, 2025
af4d50a
refactor: consolidate fetch infrastructure and enable request batching
webberwang Jul 12, 2025
52e8c07
feat: improve logging and parallel processing
webberwang Jul 12, 2025
a864a9d
feat: add page production use case and update tooling
webberwang Jul 12, 2025
e68adda
fix(apps-sites): add force-dynamic to root page to fix build error
webberwang Jul 12, 2025
dea470d
fix(libs-frontend-domain-app): add auth0 client mock to fix test failure
webberwang Jul 12, 2025
cfeb204
refactor(libs-shared-infra-fetch-server): move batch fetch implementa…
webberwang Jul 12, 2025
13392df
refactor(libs-shared-infra-fetch-server): rename server files to remo…
webberwang Jul 12, 2025
2ae6856
fix(libs-backend-application-type): preserve field order during export
webberwang Jul 12, 2025
308f4bf
fix(libs-tools-tsc-check): use source tsconfig.json instead of dist path
webberwang Jul 12, 2025
575488d
fix(libs-tools): fix env.sh semver validation in CircleCI
webberwang Jul 12, 2025
6ebc0d8
fix(libs-tools): use load-nvm command instead of manual nvm loading
webberwang Jul 12, 2025
c6cad02
fix(libs-tools): source BASH_ENV in install-nvm.sh to make nvm available
webberwang Jul 12, 2025
bbe262b
fix(libs-tools): remove remaining load-nvm from restore-workspace-dat…
webberwang Jul 12, 2025
001bdfe
feat(libs-tools): add comprehensive logging and error checking to env.sh
webberwang Jul 12, 2025
d6d7f28
fix(libs-tools): add error handling for git commands in env.sh
webberwang Jul 12, 2025
1f2d895
fix(libs-tools): add fallback for semver package installation in env.sh
webberwang Jul 12, 2025
0ac3c39
ci(libs-tools): add extensive npx debugging to diagnose CI issues
webberwang Jul 12, 2025
143b111
ci(libs-tools): add verbose npm/npx debugging to diagnose package ins…
webberwang Jul 12, 2025
6b39dfe
fix(libs-tools): use built-in regex for semver validation instead of …
webberwang Jul 12, 2025
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
121 changes: 109 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ commands:
- run:
command: |
pnpm jest --clearCache
increment-docker-version:
description: Increment Docker Version
steps:
- run: ~/project/.circleci/config/commands/increment-docker-version.sh
install-cypher-shell:
steps:
- run:
Expand Down Expand Up @@ -112,10 +108,15 @@ commands:
- ~/.nvm
- run:
command: |
source $BASH_ENV
nvm install 22.14.0
nvm alias default 22.14.0
node -v
which node
npm -v
which npm
npx -v
which npx
name: Set Node Version
install-packages:
steps:
Expand Down Expand Up @@ -225,7 +226,6 @@ commands:
keys:
- nvm-cache-{{ checksum ".nvmrc" }}
name: Restore NVM Cache
- load-nvm
- install-pnpm
- setup-env
restore-workspace-database:
Expand All @@ -247,7 +247,6 @@ commands:
keys:
- nvm-cache-{{ checksum ".nvmrc" }}
name: Restore NVM Cache
- load-nvm
- install-pnpm
- install-cypher-shell
- setup-env
Expand Down Expand Up @@ -601,10 +600,10 @@ jobs:
resource_class: large
steps:
- checkout
- install-nvm
- install-terraform
- increment-docker-version
- setup-env
- login-docker
- increment-docker-version
- persist_to_workspace:
paths:
- .docker/config.json
Expand All @@ -621,8 +620,8 @@ jobs:
resource_class: << parameters.resource_class >>
steps:
- checkout
- setup-env
- install-nvm
- setup-env
- install-pnpm
- install-packages
tf-apply:
Expand Down Expand Up @@ -951,7 +950,7 @@ workflows:
only:
- staging
requires:
- tf-apply-ci
- setup-infra-workspace
- docker-api:
context:
- prod
Expand All @@ -960,7 +959,7 @@ workflows:
only:
- staging
requires:
- tf-apply-ci
- setup-infra-workspace
- docker-sites:
context:
- prod
Expand All @@ -969,7 +968,7 @@ workflows:
only:
- staging
requires:
- tf-apply-ci
- setup-infra-workspace
- docker-landing:
context:
- prod
Expand Down Expand Up @@ -1006,4 +1005,102 @@ workflows:
requires:
- hold-apply
stage: prod
infra-pr-tag:
jobs:
- setup-infra-workspace:
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/
- tf-plan:
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/
name: tf-plan-ci
requires:
- setup-infra-workspace
stage: ci
- tf-apply:
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/
name: tf-apply-ci
requires:
- tf-plan-ci
stage: ci
- docker-web:
context:
- prod
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/
requires:
- setup-infra-workspace
- docker-api:
context:
- prod
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/
requires:
- setup-infra-workspace
- docker-sites:
context:
- prod
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/
requires:
- setup-infra-workspace
- docker-landing:
context:
- prod
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/
requires:
- setup-infra-workspace
- tf-plan:
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/
requires:
- docker-web
- docker-api
- docker-sites
- docker-landing
stage: prod
- hold-apply:
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/
requires:
- tf-plan
type: approval
- tf-apply:
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/
requires:
- hold-apply
stage: prod
working_directory: ~/project
1 change: 0 additions & 1 deletion .circleci/config/commands/.gitignore

This file was deleted.

31 changes: 0 additions & 31 deletions .circleci/config/commands/increment-docker-version.sh

This file was deleted.

9 changes: 0 additions & 9 deletions .circleci/config/commands/increment-docker-version.tmpl.json

This file was deleted.

3 changes: 0 additions & 3 deletions .circleci/config/commands/increment-docker-version.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .circleci/config/commands/install-nvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ steps:
- run:
name: 'Set Node Version'
command: |
source $BASH_ENV
nvm install 22.14.0
nvm alias default 22.14.0
node -v
which node
npm -v
which npm
npx -v
which npx
1 change: 0 additions & 1 deletion .circleci/config/commands/restore-workspace-database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ steps:
name: 'Restore NVM Cache'
keys:
- nvm-cache-{{ checksum ".nvmrc" }}
- load-nvm
- install-pnpm
- install-cypher-shell
- setup-env
1 change: 0 additions & 1 deletion .circleci/config/commands/restore-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ steps:
name: 'Restore NVM Cache'
keys:
- nvm-cache-{{ checksum ".nvmrc" }}
- load-nvm
- install-pnpm
- setup-env
81 changes: 79 additions & 2 deletions .circleci/config/env.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
#!/bin/bash

# Disable exit on error to handle commands that might return non-zero
set +e

#
# Git settings
#
echo "export GIT_COMMIT_MSG=$(git log --format=format:\"%s\" -n 1 ${CIRCLE_SHA1})" >> $BASH_ENV
echo "[env.sh] Setting up git commit message..."
echo "[env.sh] CIRCLE_SHA1: ${CIRCLE_SHA1:-not set}"
if [ -n "$CIRCLE_SHA1" ]; then
GIT_MSG=$(git log --format=format:"%s" -n 1 "$CIRCLE_SHA1" 2>&1) || {
echo "[env.sh] ERROR: Failed to get commit message for $CIRCLE_SHA1"
echo "[env.sh] Error: $GIT_MSG"
# Use HEAD as fallback
GIT_MSG=$(git log --format=format:"%s" -n 1 HEAD 2>&1) || GIT_MSG="Unknown commit"
}
else
echo "[env.sh] CIRCLE_SHA1 not set, using HEAD"
GIT_MSG=$(git log --format=format:"%s" -n 1 HEAD 2>&1) || GIT_MSG="Unknown commit"
fi
echo "export GIT_COMMIT_MSG=\"$GIT_MSG\"" >> $BASH_ENV
echo "[env.sh] Git commit message: $GIT_MSG"

#
# Global environments
Expand Down Expand Up @@ -47,6 +64,66 @@ else
echo "export SLACK_PARAM_MENTIONS=\<@${SLACK_WEBBER}\>" >> $BASH_ENV
fi

#
# Docker tag version from git tags
#
echo "[env.sh] Checking for git tags..."
# Check if we're in a git repository
if ! git rev-parse --git-dir > /dev/null 2>&1; then
echo "[env.sh] ERROR: Not in a git repository"
echo "[env.sh] Current directory: $(pwd)"
exit 1
fi

# Get current HEAD SHA
echo "[env.sh] Current HEAD: $(git rev-parse HEAD 2>&1 || echo 'Failed to get HEAD')"

# List all tags for debugging
echo "[env.sh] All tags pointing to HEAD:"
git tag --points-at HEAD 2>&1 || echo "[env.sh] Failed to get tags"

# Get semantic version tags
VERSION_TAG=$(git tag --points-at HEAD 2>/dev/null | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$" | head -1 || true)
echo "[env.sh] Version tag found: '${VERSION_TAG:-none}'"

# Check if validate-semver.js exists
if [ ! -f "./scripts/validate-semver.js" ]; then
echo "[env.sh] ERROR: validate-semver.js not found at ./scripts/validate-semver.js"
echo "[env.sh] Current directory: $(pwd)"
echo "[env.sh] Contents of scripts directory:"
ls -la ./scripts/ 2>&1 || echo "scripts directory not found"
exit 1
fi

echo "[env.sh] Running validate-semver.js..."

# Run validate-semver.js directly with node
SEMVER_CMD="node ./scripts/validate-semver.js \"$VERSION_TAG\""
echo "[env.sh] Command: $SEMVER_CMD"

# Run the command and capture both stdout and stderr
SEMVER_OUTPUT=$(eval "$SEMVER_CMD" 2>&1)
SEMVER_EXIT_CODE=$?

if [ $SEMVER_EXIT_CODE -ne 0 ]; then
echo "[env.sh] ERROR: validate-semver.js failed with exit code: $SEMVER_EXIT_CODE"
echo "[env.sh] Output: $SEMVER_OUTPUT"
# Don't exit, continue with || true behavior
else
echo "[env.sh] validate-semver.js succeeded"
# Execute the output commands
eval "$SEMVER_OUTPUT"
fi

# Done
source $BASH_ENV
echo "[env.sh] Sourcing BASH_ENV..."
if [ -f "$BASH_ENV" ]; then
source $BASH_ENV
echo "[env.sh] BASH_ENV sourced successfully"
else
echo "[env.sh] ERROR: BASH_ENV file not found at: $BASH_ENV"
exit 1
fi

echo "[env.sh] env.sh completed successfully"

3 changes: 3 additions & 0 deletions .circleci/config/install-nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ echo 'source $NVM_DIR/nvm.sh' >> $BASH_ENV
if [ ! -d "$NVM_DIR" ]; then
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
fi

# Source BASH_ENV to make nvm available in current shell
source $BASH_ENV
6 changes: 3 additions & 3 deletions .circleci/config/jobs/setup-infra-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ executor: docker-node
resource_class: large
steps:
- checkout
- install-nvm
- install-terraform
- increment-docker-version
# - install-packer
- setup-env
- login-docker
- increment-docker-version

- persist_to_workspace:
root: ~/
# Persists the docker login
Expand Down
Loading