Skip to content

feat: port podvm build/deploy workflows from fortress#23

Merged
alhassankhedr-cohere merged 15 commits intocoherefrom
alhassankhedr/cc-192-cloud-api-adaptor-port-podvm-builddeploy-workflows-from
Apr 22, 2026
Merged

feat: port podvm build/deploy workflows from fortress#23
alhassankhedr-cohere merged 15 commits intocoherefrom
alhassankhedr/cc-192-cloud-api-adaptor-port-podvm-builddeploy-workflows-from

Conversation

@alhassankhedr-cohere
Copy link
Copy Markdown

@alhassankhedr-cohere alhassankhedr-cohere commented Apr 22, 2026

Migrates the PodVM build and GCP deploy workflows from the private fortress repo so the CI pipeline and artifacts are open-source.

Key changes from the fortress originals:

  • No longer clones CAA externally (runs from within the repo)
  • Uses cvm-measure CLI for UKI extraction and RTMR2 prediction
  • Guest-components repo/ref/features are workflow_dispatch inputs
  • Reads tool versions (ORAS, etc.) from src/cloud-api-adaptor/versions.yaml
  • OCI image path is ghcr.io/cohere-ai/cloud-api-adaptor/podvm
  • Requires WIF setup from CC-193 for GCP auth

Ref: CC-192


Note

Medium Risk
Adds new CI workflows that build and publish PodVM images to GHCR and optionally create/replace GCP compute images via Workload Identity; misconfig or tagging/replacement logic could overwrite images or break releases.

Overview
Adds a new build-podvm-cohere.yaml workflow that builds release and debug PodVM images (ubuntu/fedora), optionally injects an SSH key into debug builds, computes UKI-derived RTMR2 measurements, and publishes the disk + measurements.json as an ORAS OCI artifact to GHCR with build provenance attestation.

Adds a reusable deploy-gcp-cohere.yaml workflow that verifies the GHCR attestation, pulls the artifact/measurements, uploads the disk to GCS, and creates (optionally replacing) a labeled TDX-capable GCP compute image, with the build workflow wiring an automatic deploy step after successful builds.

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

Migrates the PodVM build and GCP deploy workflows from the private
fortress repo so the CI pipeline and artifacts are open-source.

Key changes from the fortress originals:
- No longer clones CAA externally (runs from within the repo)
- Uses cvm-measure CLI for UKI extraction and RTMR2 prediction
- Guest-components repo/ref/features are workflow_dispatch inputs
- Reads tool versions (ORAS, etc.) from src/cloud-api-adaptor/versions.yaml
- OCI image path is ghcr.io/cohere-ai/cloud-api-adaptor/podvm
- Requires WIF setup from CC-193 for GCP auth

Ref: CC-192
Comment thread .github/workflows/build-podvm-cohere.yaml Fixed
Comment thread .github/workflows/build-podvm-cohere.yaml Fixed
Comment thread .github/workflows/build-podvm-cohere.yaml Fixed
Comment thread .github/workflows/deploy-gcp-cohere.yaml Fixed
Comment thread .github/workflows/build-podvm-cohere.yaml Fixed
Comment thread .github/workflows/build-podvm-cohere.yaml Fixed
Comment thread .github/workflows/build-podvm-cohere.yaml Fixed
Comment thread .github/workflows/deploy-gcp-cohere.yaml Fixed
Comment thread .github/workflows/deploy-gcp-cohere.yaml Fixed
Comment thread .github/workflows/deploy-gcp-cohere.yaml Fixed
- Add persist-credentials: false to checkout actions
- Replace ${{ github.repository }} and ${{ github.sha }} template
  expansions in run: blocks with GITHUB_REPOSITORY/GITHUB_SHA env vars
  to prevent code injection via template expansion
- Add explanatory comments to all permission declarations
- Replace secrets: inherit with explicit secret passthrough
  (GCP_WORKLOAD_IDENTITY_PROVIDER, GCP_SERVICE_ACCOUNT)
- Declare required secrets in deploy-gcp-cohere workflow_call

Ref: CC-192
Comment thread .github/workflows/build-podvm-cohere.yaml Dismissed
Comment thread .github/workflows/build-podvm-cohere.yaml Dismissed
Comment thread .github/workflows/build-podvm-cohere.yaml Dismissed
Comment thread .github/workflows/deploy-gcp-cohere.yaml Dismissed
Comment thread .github/workflows/build-podvm-cohere.yaml Outdated
Temporarily point at alhassankhedr/cc-167-tdx-measurement-toolkit
instead of main. Revert once cvm-measure PR #12 lands.

Ref: CC-192
Comment thread .github/workflows/build-podvm-cohere.yaml Outdated
Comment thread .github/workflows/build-podvm-cohere.yaml Outdated
cvm-measure is private; persist-credentials: false means the runner
has no git credentials for external clones. Pass the token explicitly
until the repo is made public.

Ref: CC-192
GITHUB_TOKEN is scoped to the current repo and cannot access
cvm-measure. Use a fine-grained PAT stored as CVM_MEASURE_TOKEN.

Ref: CC-192
Comment thread .github/workflows/build-podvm-cohere.yaml Fixed
- Branch pushes to cohere use a stable image name (cohere-latest)
  and overwrite the existing GCP image each time
- Tag pushes (podvm-v*) create a new GCP image per tag version
- workflow_dispatch respects the replace_existing_image input

Ref: CC-192
Comment thread .github/workflows/build-podvm-cohere.yaml Outdated
- Use matrix strategy to build release and debug profiles concurrently
- Add meta job to compute image names/tags for both profiles
- Two explicit deploy jobs (release + debug) to GCP
- Branch pushes overwrite cohere-latest images, tag pushes create new ones
- Always inject DEBUG_SSH_PUBLIC_KEY into debug builds
- Remove image_profile input (both profiles always built)

Ref: CC-192
PEP 668 enforcement on Ubuntu 24.04 runners blocks bare pip install
into system Python. Add the flag to work around the externally-managed
environment check.

Ref: CC-192
Comment thread .github/workflows/build-podvm-cohere.yaml

- name: Install cvm-measure
env:
CVM_TOKEN: ${{ secrets.CVM_MEASURE_TOKEN }}
Comment thread .github/workflows/build-podvm-cohere.yaml Outdated
yousef-cohere
yousef-cohere previously approved these changes Apr 22, 2026
Replace the two separate deploy jobs with a single deploy-gcp job
using a matrix strategy over [release, debug], as suggested in PR review.

Ref: CC-192
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, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 098eb08. Configure here.

Comment thread .github/workflows/build-podvm-cohere.yaml Outdated
The OR expression always short-circuited on branch dispatches because
meta.replace_image is unconditionally "true" for non-tag refs. Gate
each source on the event type so push events use the computed flag
while workflow_dispatch honours the user's input.

Ref: CC-192
@alhassankhedr-cohere alhassankhedr-cohere merged commit 24e0361 into cohere Apr 22, 2026
26 of 28 checks passed
@alhassankhedr-cohere alhassankhedr-cohere deleted the alhassankhedr/cc-192-cloud-api-adaptor-port-podvm-builddeploy-workflows-from branch April 22, 2026 21:14
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.

3 participants