diff --git a/.github/workflows/deploy-staging-admin.yml b/.github/workflows/deploy-staging-admin.yml index a5425e0c7..42ef650cb 100644 --- a/.github/workflows/deploy-staging-admin.yml +++ b/.github/workflows/deploy-staging-admin.yml @@ -30,7 +30,6 @@ on: default: gateway-admin options: - gateway-admin - - admin-front actor: required: true type: string diff --git a/.github/workflows/deploy-staging-frontends.yml b/.github/workflows/deploy-staging-frontends.yml index 9ac361a4d..ab0a0ecd8 100644 --- a/.github/workflows/deploy-staging-frontends.yml +++ b/.github/workflows/deploy-staging-frontends.yml @@ -29,11 +29,13 @@ on: type: choice default: user-front options: + - admin-front - user-front - docs-front prebuilt_image_digest: required: false type: string + description: "Optional immutable Artifact Registry image@sha256 digest for admin-front/user-front/docs-front." actor: required: true type: string @@ -155,10 +157,10 @@ jobs: set -euo pipefail echo "FAILED_STEP=resolve_frontend_deploy_scope" >> "$GITHUB_ENV" case "${DEPLOY_SCOPE}" in - user-front|docs-front) + admin-front|user-front|docs-front) ;; *) - echo "Deploy Staging Frontends only supports user-front or docs-front; got ${DEPLOY_SCOPE}" >&2 + echo "Deploy Staging Frontends only supports admin-front, user-front, or docs-front; got ${DEPLOY_SCOPE}" >&2 exit 2 ;; esac @@ -171,7 +173,7 @@ jobs: const fs = require('fs') const scope = JSON.parse(fs.readFileSync('scope.json', 'utf8')) const unsupported = (scope.services || []).filter( - (service) => !['user-front', 'docs-front'].includes(service) + (service) => !['admin-front', 'user-front', 'docs-front'].includes(service) ) if (unsupported.length > 0) { throw new Error(`frontend workflow received unsupported services: ${unsupported.join(', ')}`) @@ -224,7 +226,7 @@ jobs: const region = process.env.REGION const repository = process.env.ARTIFACT_REGISTRY_REPOSITORY const services = (process.env.DEPLOY_SERVICES || '').split(',').filter(Boolean) - if (!['user-front', 'docs-front'].includes(service)) { + if (!['admin-front', 'user-front', 'docs-front'].includes(service)) { throw new Error(`prebuilt frontend image is not supported for ${service}`) } if (services.length !== 1 || services[0] !== service) { @@ -290,6 +292,7 @@ jobs: const fs = require('fs') const images = JSON.parse(fs.readFileSync('image-digests.json', 'utf8')) const names = { + 'admin-front': 'synapse-staging-admin-front', 'user-front': 'synapse-staging-user-front', 'docs-front': 'synapse-staging-docs-front', } @@ -330,6 +333,7 @@ jobs: const fs = require('fs') const images = JSON.parse(fs.readFileSync('image-digests.json', 'utf8')) const names = { + 'admin-front': 'synapse-staging-admin-front', 'user-front': 'synapse-staging-user-front', 'docs-front': 'synapse-staging-docs-front', } diff --git a/docs/reference/agent-lessons/codex-admin-front-prebuilt-staging.md b/docs/reference/agent-lessons/codex-admin-front-prebuilt-staging.md new file mode 100644 index 000000000..2337ac792 --- /dev/null +++ b/docs/reference/agent-lessons/codex-admin-front-prebuilt-staging.md @@ -0,0 +1 @@ +No new lessons. diff --git a/scripts/deploy/deploy_staging_frontends_workflow.test.mjs b/scripts/deploy/deploy_staging_frontends_workflow.test.mjs index a8a797a53..6a9ca07b7 100644 --- a/scripts/deploy/deploy_staging_frontends_workflow.test.mjs +++ b/scripts/deploy/deploy_staging_frontends_workflow.test.mjs @@ -43,16 +43,12 @@ test("staging frontend workflow is standalone and does not run database migratio ); }); -test("staging frontend workflow only accepts user-front and docs-front", () => { +test("staging frontend workflow accepts the three frontend services", () => { const text = workflowText(); + assert.match(text, /deploy_scope:[\s\S]*options:[\s\S]*-\s+admin-front/); assert.match(text, /deploy_scope:[\s\S]*options:[\s\S]*-\s+user-front/); assert.match(text, /deploy_scope:[\s\S]*options:[\s\S]*-\s+docs-front/); - assert.doesNotMatch( - text, - /deploy_scope:[\s\S]*options:[\s\S]*-\s+admin-front/, - "admin-front must continue through the admin workflow because it depends on gateway-admin migration" - ); }); test("staging frontend workflow has bounded long-running steps", () => { diff --git a/scripts/deploy/local_build_staging_image.sh b/scripts/deploy/local_build_staging_image.sh index 833b75dbf..7a10b60aa 100755 --- a/scripts/deploy/local_build_staging_image.sh +++ b/scripts/deploy/local_build_staging_image.sh @@ -14,10 +14,11 @@ ATTACH="auto" usage() { cat <<'USAGE' Usage: - scripts/deploy/local_build_staging_image.sh --service user-front --ref main --release-task-id 123 + scripts/deploy/local_build_staging_image.sh --service admin-front --ref main --release-task-id 123 Options: - --service Frontend service to build. + --service + Frontend service to build. --ref Git ref to build from. Default: main. --release-task-id Attach the immutable digest to this Ops Console release task. --ops-console-url Ops Console URL. Default: http://localhost:9700. @@ -77,10 +78,10 @@ require_cmd docker require_cmd node case "${SERVICE}" in - user-front|docs-front) + admin-front|user-front|docs-front) ;; *) - echo "--service must be user-front or docs-front" >&2 + echo "--service must be admin-front, user-front, or docs-front" >&2 exit 2 ;; esac