diff --git a/.gitea/workflows/ci-stage.yaml b/.gitea/workflows/ci-stage.yaml index d8b4ee1..281e9bb 100644 --- a/.gitea/workflows/ci-stage.yaml +++ b/.gitea/workflows/ci-stage.yaml @@ -212,12 +212,21 @@ jobs: env: GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} run: | + # Fail loudly: previously this step had no `set -e`, so an auth or + # upload failure was swallowed (step exited 0 on the trailing echo) + # and the SDK silently never published. Surface failures now. + set -euo pipefail + if [ -z "${GCP_SA_KEY:-}" ]; then + echo "FATAL: GCP_SA_KEY secret is empty — cannot authenticate to publish" >&2 + exit 1 + fi echo "${GCP_SA_KEY}" > /tmp/gcp-key.json apt-get install -y -qq apt-transport-https ca-certificates curl echo "deb [trusted=yes] https://packages.cloud.google.com/apt cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list apt-get update -qq && apt-get install -y google-cloud-cli gcloud auth activate-service-account --key-file=/tmp/gcp-key.json gcloud config set project neuron-785695 + echo "Publishing as active account: $(gcloud config get-value account 2>/dev/null)" VERSION="${GITHUB_SHA:0:8}" @@ -253,6 +262,12 @@ jobs: # Patches ci-base:stage in-place: pulls the existing image (which has all # system deps — Node, Go, gcloud, Docker CLI, etc.) and overlays the freshly # built El SDK on top. Keeps the full ci-base rebuild fast and incremental. + # + # continue-on-error: this is a CI-cache optimization, NOT the release + # artifact. It runs Docker (pull/build/push ~600MB) on the host-mode GCE + # runner where DinD/Docker availability is fragile. A failure here must + # never block or redden the job — the SDK publish above is the deliverable. + continue-on-error: true if: github.event_name == 'push' env: GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} diff --git a/.gitea/workflows/sdk-release.yaml b/.gitea/workflows/sdk-release.yaml index 35f2fc6..66d9c3a 100644 --- a/.gitea/workflows/sdk-release.yaml +++ b/.gitea/workflows/sdk-release.yaml @@ -288,12 +288,21 @@ jobs: env: GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} run: | + # Fail loudly: previously this step had no `set -e`, so an auth or + # upload failure was swallowed (step exited 0 on the trailing echo) + # and the SDK silently never published. Surface failures now. + set -euo pipefail + if [ -z "${GCP_SA_KEY:-}" ]; then + echo "FATAL: GCP_SA_KEY secret is empty — cannot authenticate to publish" >&2 + exit 1 + fi echo "${GCP_SA_KEY}" > /tmp/gcp-key.json apt-get install -y -qq apt-transport-https ca-certificates curl echo "deb [trusted=yes] https://packages.cloud.google.com/apt cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list apt-get update -qq && apt-get install -y google-cloud-cli gcloud auth activate-service-account --key-file=/tmp/gcp-key.json gcloud config set project neuron-785695 + echo "Publishing as active account: $(gcloud config get-value account 2>/dev/null)" VERSION="${GITHUB_SHA:0:8}" @@ -345,6 +354,12 @@ jobs: # Patches ci-base:latest in-place: pulls the existing image (which has all # system deps — Node, Go, gcloud, Docker CLI, etc.) and overlays the freshly # built El SDK on top. Keeps the full ci-base rebuild fast and incremental. + # + # continue-on-error: this is a CI-cache optimization, NOT the release + # artifact. It runs Docker (pull/build/push ~600MB) on the host-mode GCE + # runner where DinD/Docker availability is fragile. A failure here must + # never block or redden the job — the SDK publish above is the deliverable. + continue-on-error: true if: github.event_name == 'push' env: GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}