Reverts the working tree for these six files to their state at7c5cb78(the control-portal merge, reconciled with the auto-deploy digest bump) -- undoingc5b8361,74ff146,b1a07b7,db3e5a8,0bb3e4b, and9b226f7. Those six commits were reactive fixes chasing CI failures one at a time; each one changed the failure mode without ever reaching a fully green run, and the last one coincided with the browser session itself crashing mid-test rather than a logic assertion failing. Reverting to a clean, known point (right after the merge, before any of that patching) rather than continuing to layer fixes on an unverified base. Note: this reintroduces a real, independently-confirmed bug fixed bydb3e5a8-- deploy/chart/templates/worlds.yaml's per-world loop is missing a newline between iterations (a leading whitespace-trim on the $host template variable eats it), which breaks `helm lint` / `helm template` for any values file with more than one world. That will fail again on the next push if it isn't re-applied. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
98 lines
3.8 KiB
YAML
98 lines
3.8 KiB
YAML
name: Verify, publish, and promote
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
paths-ignore: [deploy/values-srs.yaml]
|
|
pull_request:
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-22.04
|
|
services:
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
env:
|
|
POSTGRES_USER: aeternalis
|
|
POSTGRES_PASSWORD: ci-test-only
|
|
POSTGRES_DB: aeternalis_test
|
|
options: >-
|
|
--health-cmd "pg_isready -U aeternalis -d aeternalis_test"
|
|
--health-interval 5s --health-timeout 5s --health-retries 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with: { node-version: "24", cache: npm }
|
|
- uses: actions/setup-go@v5
|
|
with: { go-version-file: server/go.mod, cache-dependency-path: server/go.sum }
|
|
- run: npm ci --no-fund
|
|
- run: npm run test:contracts && npm run check && npm run build
|
|
- name: Go tests, race detector, and PostgreSQL integration
|
|
working-directory: server
|
|
env:
|
|
TEST_DATABASE_URL: postgres://aeternalis:ci-test-only@postgres:5432/aeternalis_test?sslmode=disable
|
|
run: go test -race -count=1 ./...
|
|
- name: Go static analysis
|
|
working-directory: server
|
|
run: go vet ./...
|
|
- run: npx playwright install --with-deps chromium
|
|
- run: npm run test:e2e
|
|
- uses: azure/setup-helm@v4.3.0
|
|
- run: |
|
|
helm lint deploy/chart
|
|
helm template aeternalis deploy/chart > /tmp/aeternalis.yaml
|
|
helm lint deploy/chart -f deploy/values-srs.yaml
|
|
helm template aeternalis deploy/chart -f deploy/values-srs.yaml > /tmp/aeternalis-srs.yaml
|
|
|
|
publish:
|
|
if: gitea.event_name == 'push'
|
|
needs: verify
|
|
runs-on: ubuntu-22.04
|
|
outputs:
|
|
digest: ${{ steps.build.outputs.digest }}
|
|
env:
|
|
# gitea-runner-config sets container.options: --add-host=docker-host:host-gateway,
|
|
# meant to make "docker-host" resolve inside job containers -- but that alias isn't
|
|
# landing on this job's own container (DNS lookup of docker-host fails), even though
|
|
# act_runner's own connection to the same daemon (proven by verify's Postgres service
|
|
# working) resolves it via the pod's hostAliases to 172.17.0.1. Use that address
|
|
# directly rather than depend on the container-option alias.
|
|
# TODO(ops): fix container.options/--add-host so job containers get "docker-host"
|
|
# for real, then this can go back to using that name instead of a hardcoded IP.
|
|
DOCKER_HOST: tcp://172.17.0.1:2375
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: docker/setup-buildx-action@v3
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ vars.HARBOR_HOST }}
|
|
username: ${{ secrets.HARBOR_USERNAME }}
|
|
password: ${{ secrets.HARBOR_PASSWORD }}
|
|
- uses: docker/build-push-action@v6
|
|
id: build
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ vars.HARBOR_HOST }}/${{ vars.HARBOR_PROJECT }}/aeternalis:${{ gitea.sha }}
|
|
provenance: true
|
|
sbom: true
|
|
|
|
promote:
|
|
if: gitea.event_name == 'push' && vars.GITOPS_REPOSITORY != ''
|
|
needs: publish
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with: { node-version: "24" }
|
|
- run: npm ci --no-fund
|
|
- name: Update GitOps image digest
|
|
env:
|
|
GITOPS_REPOSITORY: ${{ vars.GITOPS_REPOSITORY }}
|
|
GITOPS_BRANCH: ${{ vars.GITOPS_BRANCH }}
|
|
GITOPS_VALUES_FILE: ${{ vars.GITOPS_VALUES_FILE }}
|
|
GITOPS_USERNAME: ${{ secrets.GITOPS_USERNAME }}
|
|
GITOPS_TOKEN: ${{ secrets.GITOPS_TOKEN }}
|
|
IMAGE_REPOSITORY: ${{ vars.HARBOR_HOST }}/${{ vars.HARBOR_PROJECT }}/aeternalis
|
|
IMAGE_DIGEST: ${{ needs.publish.outputs.digest }}
|
|
run: node tools/promote-gitops.mjs
|