From e2c74845982dd4c344478b23ee28024f843ffdfc Mon Sep 17 00:00:00 2001 From: Mikael Hugo Date: Mon, 18 May 2026 00:34:56 +0200 Subject: [PATCH] ci: deploy sf-server through k3s only --- .forgejo/workflows/self-deploy.yml | 58 ------------------------------ 1 file changed, 58 deletions(-) diff --git a/.forgejo/workflows/self-deploy.yml b/.forgejo/workflows/self-deploy.yml index 1234b1f63..2580ba778 100644 --- a/.forgejo/workflows/self-deploy.yml +++ b/.forgejo/workflows/self-deploy.yml @@ -21,8 +21,6 @@ env: SF_PROD_NAMESPACE: ${{ vars.SF_PROD_NAMESPACE }} SF_TEST_DEPLOYMENT: ${{ vars.SF_TEST_DEPLOYMENT }} SF_PROD_DEPLOYMENT: ${{ vars.SF_PROD_DEPLOYMENT }} - SF_VEGA_UPGRADE_URL: ${{ vars.SF_VEGA_UPGRADE_URL }} - SF_VEGA_UPGRADE_TOKEN: ${{ secrets.SF_VEGA_UPGRADE_TOKEN }} jobs: build: @@ -96,62 +94,6 @@ jobs: if: env.SF_PUSH_IMAGE != '0' run: docker push "${{ steps.image.outputs.image }}" - deploy-vega-source: - name: upgrade vega source server - needs: build - runs-on: docker - if: vars.SF_VEGA_UPGRADE_URL != '' - steps: - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - - - name: Trigger source-mounted server upgrade - shell: bash - run: | - set -euo pipefail - base="${SF_VEGA_UPGRADE_URL%/}" - auth_args=() - if [ -n "${SF_VEGA_UPGRADE_TOKEN:-}" ]; then - auth_args=(-H "Authorization: Bearer ${SF_VEGA_UPGRADE_TOKEN}") - fi - response="$(curl --fail --silent --show-error \ - -X POST \ - "${auth_args[@]}" \ - "$base/api/server-upgrade")" - printf '%s\n' "$response" - - - name: Wait for vega source server revision - shell: bash - run: | - set -euo pipefail - base="${SF_VEGA_UPGRADE_URL%/}" - expected="${GITHUB_SHA:-$(git rev-parse HEAD)}" - auth_args=() - if [ -n "${SF_VEGA_UPGRADE_TOKEN:-}" ]; then - auth_args=(-H "Authorization: Bearer ${SF_VEGA_UPGRADE_TOKEN}") - fi - deadline=$((SECONDS + 900)) - last="" - while [ "$SECONDS" -lt "$deadline" ]; do - payload="$(curl --fail --silent --show-error \ - "${auth_args[@]}" \ - "$base/api/ready" || true)" - if [ -n "$payload" ]; then - last="$payload" - actual="$(node -e 'const fs=require("node:fs"); const j=JSON.parse(fs.readFileSync(0,"utf8")); process.stdout.write(String(j.gitSha || ""));' <<<"$payload")" - ready="$(node -e 'const fs=require("node:fs"); const j=JSON.parse(fs.readFileSync(0,"utf8")); process.stdout.write(String(j.ready === true));' <<<"$payload")" - if [ "$ready" = "true" ] && [ "$actual" = "$expected" ]; then - printf 'vega source server upgraded to %s\n' "$actual" - exit 0 - fi - printf 'waiting for vega source server: ready=%s sha=%s expected=%s\n' "$ready" "$actual" "$expected" - fi - sleep 5 - done - printf 'Timed out waiting for vega source server to advertise %s. Last payload:\n%s\n' "$expected" "$last" >&2 - exit 1 deploy-test: name: deploy test and probe