-
Notifications
You must be signed in to change notification settings - Fork 0
making deploy quicker - less intervals, observability now optional #123
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
27c41f5
making deploy quicker - less intervals, observability now optional
HardMax71 da2ef68
Changes Made
HardMax71 feeebe7
Replaced two separate scan jobs (scan-backend, scan-frontend) with a…
HardMax71 3dccec6
What changed
HardMax71 16152ba
1. Playwright Sharding (frontend-e2e)
HardMax71 7dd2244
Here's what this adds — infrastructure pre-warming:
HardMax71 69ed72a
The root cause: cert-generator service in docker-compose.yaml mounts …
HardMax71 815d6c6
Backend E2E step reorder (stack-tests.yml):
HardMax71 073a3d7
Before (19 steps, 6 sequential push steps = ~81s pushing):
HardMax71 9f164c7
Two changes made:
HardMax71 89871ae
Root cause analysis: docker compose up -d --no-build (even without -…
HardMax71 33e8c33
What changed: frontend.depends_on.backend: service_healthy → service…
HardMax71 c9ac036
fixes
HardMax71 68c18b8
Created 2 composite actions, deleted 2 unused ones:
HardMax71 5ecb455
fixes
HardMax71 b62ebbd
updated docs + branch = main for all CI workflows (removed dev)
HardMax71 595c223
clarified 12/13 images in docs
HardMax71 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,43 @@ | ||
| name: 'E2E Boot' | ||
| description: 'Kick off slow background tasks: GHCR auth, image pull + infra pre-warm, k3s install' | ||
|
|
||
| inputs: | ||
| image-tag: | ||
| description: 'GHCR image tag (e.g., sha-abc1234)' | ||
| required: true | ||
| github-token: | ||
| description: 'GitHub token for GHCR authentication' | ||
| required: true | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Log in to GHCR | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ${{ env.REGISTRY }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ inputs.github-token }} | ||
|
|
||
| - name: Pull images and pre-warm infra (background) | ||
| shell: bash | ||
| env: | ||
| IMAGE_TAG: ${{ inputs.image-tag }} | ||
| run: | | ||
| nohup bash -c ' | ||
| IMAGE_TAG='"$IMAGE_TAG"' docker compose pull --quiet 2>&1 | ||
| echo "--- pull done, starting infra ---" | ||
| docker compose up -d --no-build \ | ||
| mongo redis shared-ca zookeeper-certgen zookeeper kafka schema-registry 2>&1 | ||
| echo $? > /tmp/infra-pull.exit | ||
| ' > /tmp/infra-pull.log 2>&1 & | ||
| echo $! > /tmp/infra-pull.pid | ||
|
|
||
| - name: Install k3s | ||
| shell: bash | ||
| run: | | ||
| K3S_TAG=$(echo "$K3S_VERSION" | sed 's/+/%2B/g') | ||
| curl -sfL "https://raw.githubusercontent.com/k3s-io/k3s/${K3S_TAG}/install.sh" -o /tmp/k3s-install.sh | ||
HardMax71 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo "$K3S_INSTALL_SHA256 /tmp/k3s-install.sh" | sha256sum -c - | ||
| chmod +x /tmp/k3s-install.sh | ||
| INSTALL_K3S_VERSION="$K3S_VERSION" INSTALL_K3S_EXEC="--disable=traefik --bind-address 0.0.0.0 --tls-san host.docker.internal" /tmp/k3s-install.sh | ||
This file contains hidden or 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,85 @@ | ||
| name: 'E2E Ready' | ||
| description: 'Finalize k3s, wait for infra, start compose stack, health-check, seed test users' | ||
|
|
||
| inputs: | ||
| image-tag: | ||
| description: 'GHCR image tag (e.g., sha-abc1234)' | ||
| required: true | ||
| wait-for-frontend: | ||
| description: 'Also wait for frontend health check (default: false)' | ||
| required: false | ||
| default: 'false' | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Finalize k3s | ||
| shell: bash | ||
| run: | | ||
| mkdir -p /home/runner/.kube | ||
| sudo k3s kubectl config view --raw > /home/runner/.kube/config | ||
| sudo chmod 600 /home/runner/.kube/config | ||
| export KUBECONFIG=/home/runner/.kube/config | ||
| timeout 90 bash -c 'until kubectl cluster-info 2>/dev/null; do sleep 3; done' | ||
| kubectl create namespace integr8scode --dry-run=client -o yaml | kubectl apply -f - | ||
| sed -E 's#https://(127\.0\.0\.1|0\.0\.0\.0):6443#https://host.docker.internal:6443#g' \ | ||
| /home/runner/.kube/config > backend/kubeconfig.yaml | ||
| chmod 644 backend/kubeconfig.yaml | ||
|
|
||
| - name: Start cert-generator (background) | ||
| shell: bash | ||
| env: | ||
| IMAGE_TAG: ${{ inputs.image-tag }} | ||
| run: | | ||
| nohup docker compose up -d --no-build cert-generator \ | ||
| > /tmp/cert-gen.log 2>&1 & | ||
|
|
||
| - name: Use test environment config | ||
| shell: bash | ||
| run: | | ||
| cp backend/config.test.toml backend/config.toml | ||
| cp backend/secrets.example.toml backend/secrets.toml | ||
|
|
||
| - name: Wait for image pull and infra | ||
| shell: bash | ||
| run: | | ||
| if [ -f /tmp/infra-pull.pid ]; then | ||
| PID=$(cat /tmp/infra-pull.pid) | ||
| if kill -0 "$PID" 2>/dev/null; then | ||
| echo "Waiting for image pull + infra startup..." | ||
| tail --pid="$PID" -f /dev/null 2>/dev/null || true | ||
| fi | ||
| fi | ||
| cat /tmp/infra-pull.log 2>/dev/null || true | ||
| cat /tmp/cert-gen.log 2>/dev/null || true | ||
HardMax71 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if [ -f /tmp/infra-pull.exit ]; then | ||
| EXIT_CODE=$(cat /tmp/infra-pull.exit) | ||
| if [ "$EXIT_CODE" != "0" ]; then | ||
| echo "::error::Background image pull / infra pre-warm failed (exit $EXIT_CODE)" | ||
| exit 1 | ||
| fi | ||
| fi | ||
|
|
||
| - name: Start stack | ||
| shell: bash | ||
| env: | ||
| IMAGE_TAG: ${{ inputs.image-tag }} | ||
| run: docker compose up -d --no-build | ||
|
|
||
| - name: Wait for services | ||
| shell: bash | ||
| env: | ||
| WAIT_FOR_FRONTEND: ${{ inputs.wait-for-frontend }} | ||
| run: | | ||
| echo "Waiting for backend health..." | ||
| timeout 120 bash -c 'until curl -ksf https://localhost/api/v1/health/live 2>/dev/null; do sleep 2; done' | ||
| echo "Backend ready" | ||
| if [ "$WAIT_FOR_FRONTEND" = "true" ]; then | ||
| echo "Waiting for frontend health..." | ||
| timeout 60 bash -c 'until curl -ksf https://localhost:5001 2>/dev/null; do sleep 2; done' | ||
| echo "Frontend ready" | ||
| fi | ||
|
|
||
| - name: Seed test users | ||
| shell: bash | ||
| run: docker compose exec -T backend uv run python scripts/seed_users.py | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.