Skip to content

ci: publish busybox binaries to GCS public builds bucket#1

Merged
tomassrnka merged 7 commits intomainfrom
publish-to-gcs
Apr 9, 2026
Merged

ci: publish busybox binaries to GCS public builds bucket#1
tomassrnka merged 7 commits intomainfrom
publish-to-gcs

Conversation

@tomassrnka
Copy link
Copy Markdown
Member

Summary

  • Adds a publish job to the build workflow that uploads busybox binaries to the GCS public builds bucket (e2b-prod-public-builds/busybox/{arch}/busybox)
  • Mirrors the pattern used by fc-kernels for GCS publishing
  • Keeps the existing GitHub release unchanged

Why

The infra repo is moving busybox from a compile-time //go:embed to a runtime disk read (see e2b-dev/infra#2326). This requires busybox to be in the GCS public bucket so orchestrator hosts can mount it via gcsfuse/s3fs.

Prerequisites

  • GCP_WORKLOAD_IDENTITY_PROVIDER and GCP_SERVICE_ACCOUNT_EMAIL secrets must be configured (same as fc-kernels)
  • GCP_BUCKET_NAME variable must be set to e2b-prod-public-builds (same as fc-kernels)

Test plan

  • Verify secrets/variables match fc-kernels configuration
  • Push a test tag to trigger the workflow
  • Verify binaries appear at gs://e2b-prod-public-builds/busybox/amd64/busybox and gs://e2b-prod-public-builds/busybox/arm64/busybox
  • Verify GitHub release is still created correctly

🤖 Generated with Claude Code

Add a publish job that uploads both amd64 and arm64 busybox binaries to
the GCS public builds bucket (e2b-prod-public-builds/busybox/{arch}/busybox)
after a successful build. This mirrors how fc-kernels publishes to GCS.

Previously, busybox was only available via GitHub releases and had to be
fetched at compile time for go:embed. The infra repo is moving to runtime
disk reads (like kernels and firecracker), which requires busybox to be
in the GCS bucket for host-init downloads and gcsfuse/s3fs mounts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 8, 2026

PR Summary

Medium Risk
Adds new GitHub Actions OIDC-based GCP authentication and automated uploads of release artifacts to a GCS bucket, plus Terraform to provision the required IAM/secret wiring; misconfiguration could break releases or widen bucket access.

Overview
Extends the tag-based BusyBox build workflow with a new publish job that downloads build artifacts, restructures them into a versioned layout, generates per-arch busybox.sha256 sidecars, and uploads them to a configured GCS bucket using GitHub Actions OIDC (google-github-actions/auth). The GitHub Release step is retained, now running after the optional GCS upload.

Adds a terraform/ module (and supporting .env.template/Makefile/lockfile) to provision GCP Workload Identity Federation + a service account with GCS object upload permissions, and to automatically set the repo’s GCP_WORKLOAD_IDENTITY_PROVIDER, GCP_SERVICE_ACCOUNT_EMAIL secrets and GCP_BUCKET_NAME variable. Also updates .gitignore to exclude local Terraform/env artifacts.

Reviewed by Cursor Bugbot for commit dc8070c. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Autofix Details

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: Deprecated v1 Google actions will fail on runner
    • Updated google-github-actions/auth and google-github-actions/upload-cloud-storage from @v1 to @V3 to use Node 24 which is supported on ubuntu-24.04 runners.
  • ✅ Fixed: GCS failure blocks previously-working GitHub release creation
    • Added continue-on-error: true to both GCS steps so that failures will not block the subsequent GitHub release steps from executing.

Create PR

Or push these changes by commenting:

@cursor push 3a8abe9bda
Preview (3a8abe9bda)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -71,13 +71,17 @@
           ls -laR gcs-upload/
 
       - name: Setup GCP auth
-        uses: google-github-actions/auth@v1
+        id: gcp-auth
+        uses: google-github-actions/auth@v3
+        continue-on-error: true
         with:
           workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
           service_account: ${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }}
 
       - name: Upload to GCS
-        uses: google-github-actions/upload-cloud-storage@v1
+        if: steps.gcp-auth.outcome == 'success'
+        uses: google-github-actions/upload-cloud-storage@v3
+        continue-on-error: true
         with:
           path: gcs-upload
           destination: ${{ vars.GCP_BUCKET_NAME }}/busybox

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Comment thread .github/workflows/build.yml Outdated
Comment thread .github/workflows/build.yml
tomassrnka and others added 2 commits April 8, 2026 14:49
Upload to busybox/{version}/{arch}/busybox instead of busybox/{arch}/busybox,
matching the versioned path structure expected by infra's fetch-busybox.sh
and the runtime path resolution in the orchestrator.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ng release

- Update google-github-actions/auth and upload-cloud-storage from @v1 to @V3
  (v1 uses deprecated Node 16, unsupported on ubuntu-24.04 runners)
- Add continue-on-error to GCS steps so GitHub release creation still
  proceeds if GCS auth or upload fails

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread .github/workflows/build.yml
@tomassrnka
Copy link
Copy Markdown
Member Author

bugbot run

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 47063d4. Configure here.

tomassrnka and others added 2 commits April 8, 2026 15:02
Generate a busybox.sha256 checksum file for each arch and upload it
alongside the binary. This allows downstream consumers (fetch-busybox.sh)
to verify integrity after download.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mirrors the fc-kernels setup: creates a Workload Identity Federation
pool, service account with objectUser access to the public builds
bucket, and automatically configures the GitHub repo secrets/variables
needed by the CI workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fe8115f. Configure here.

Comment thread terraform/main.tf Outdated
tomassrnka and others added 2 commits April 8, 2026 16:06
Leftover from fc-kernels template copy. No random_* resources exist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomassrnka tomassrnka marked this pull request as ready for review April 9, 2026 10:29
@tomassrnka tomassrnka merged commit d08897d into main Apr 9, 2026
6 checks passed
@jakubno jakubno deleted the publish-to-gcs branch April 9, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants