Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,24 @@ from a repository secret. Until that secret exists the job **silently skips**
(rather than failing on every push), so set up this once or merged runner
changes will deploy nothing:

1. Create a service account with at least `roles/run.admin`,
`roles/cloudbuild.builds.editor` and `roles/iam.serviceAccountUser`, generate
a JSON key, and download it.
1. Create a service account and grant it every role a **source** deploy needs,
then generate a JSON key and download it. `gcloud run deploy --source` does
more than create the service: it uploads the source to a bucket, builds an
image, and pushes that image to Artifact Registry. Each step needs its own
permission, and the failure only ever names the first one it is missing, so
grant the lot up front:

| Role | Why |
| --- | --- |
| `roles/run.admin` | create and route the revision |
| `roles/iam.serviceAccountUser` | act as the runtime service account |
| `roles/cloudbuild.builds.editor` | run the build |
| `roles/artifactregistry.writer` | push the built image (else `artifactregistry.repositories.get` is denied) |
| `roles/storage.objectAdmin` | read/write the source bucket `run-sources-<project>-<region>` (else `storage.buckets.get` is denied) |
Comment on lines +188 to +189

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Workflow comment still lists three roles

The authentication step's credential comment still names only three roles. Readers following that comment can miss the two roles added here.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.


Scope the last two to the repository and bucket if you prefer, but a partial
set fails at deploy time with a message naming only the next missing
permission — which is how this list was corrected twice.
2. In **Settings → Secrets and variables → Actions**, create a repository secret
named `CCC_FFAI_RUNNER_SA_KEY_JSON` whose value is the key's full JSON
(including the surrounding `{ }`).
Expand Down
Loading