agentleFS
hoophqhoophq/hoop/.claude/skills/gcp-marketplace-publish/SKILL.md

gcp-marketplace-publish

Skill861 starsChanged 25 days agoMITView on GitHub

Publish a hoop release of the sidecar to the GCP Marketplace Terraform Kubernetes app listing (RD-413) - copy the image, push the chart, upload the Terraform module, test it on GKE, then guide the Producer Portal steps. Use when asked to update, rebuild or publish the GCP Marketplace sidecar listing, or after a Marketplace CVE notice for it.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask the operator for anything missing.

    line 20
  2. Distinctive:

    Check the release exists, and which Go built it, before anything else:

    line 33
  3. Very specific:

    If https://go.dev/doc/devel/release lists a newer patch release of that Go with security fixes, stop: the repo's toolchain (go.work, …

    line 43
  4. Very specific:

    Run test with a command timeout of at least 30 minutes.

    line 83
  5. Distinctive:

    Do not continue to step 4 on a failed test.

    line 93
  6. Distinctive:

    After uploading a zip again under the same path, select the module again in the release: Producer Portal can keep validating the older copy.

    line 107

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Publish the sidecar to GCP Marketplace

On demand, not per release: after a Marketplace CVE notice, or when a release is worth showing. The listing is a showcase; keep it on a recent release.

Everything runs through scripts/gcp-marketplace/sidecar.sh (make targets gcp-marketplace-sidecar-{setup,bundle,publish,test}). Read its header for every setting. Do not reproduce its steps by hand.

Nothing here makes anything public. Publishing to customers is a Producer Portal action that only the operator takes.

0. Inputs

Ask the operator for anything missing; never guess these:

SettingWhere it comes from
VERSIONThe hoop release, e.g. 1.237.0. Must exist as hoophq/hoopsidecar:<VERSION>-distroless on Docker Hub
SERVICE_NAMEProducer Portal → Overview → the sidecar product → Service name
CONSUMPTION_LABELProducer Portal → Overview → Consumption tracking label (isol_plb32_...)
GCP_PROJECTDefault hoopdev-public, the partner project

Tools: gcloud (logged in, with Artifact Registry, Storage and GKE rights on the project), crane, go, helm, kubectl, zip, and terraform or tofu. On Nix: nix-shell -p google-cloud-sdk crane kubernetes-helm kubectl zip opentofu go.

Check the release exists, and which Go built it, before anything else:

mkdir -p /tmp/hoop-img
crane export --platform linux/amd64 docker.io/hoophq/hoopsidecar:$VERSION-distroless - | tar -xf - -C /tmp/hoop-img app/hoop
go version /tmp/hoop-img/app/hoop    # e.g. go1.26.8

Marketplace scans the image and rejects a release with any known vulnerability, including Go standard library CVEs that cannot affect Linux. If https://go.dev/doc/devel/release lists a newer patch release of that Go with security fixes, stop: the repo's toolchain (go.work, go.mod) must be raised and a new hoop release made first. Publishing anyway only fails the scan two hours later.

1. Setup (first time per project only)

make gcp-marketplace-sidecar-setup

Creates a private Artifact Registry repository and a private, versioned bucket. Safe to run again.

2. Publish

make gcp-marketplace-sidecar-publish VERSION=$VERSION SERVICE_NAME=... CONSUMPTION_LABEL=...

Pushes the amd64 distroless image with the Marketplace annotation, tagged <VERSION> and MAJOR.MINOR; the chart as hoopsidecar-chart:MAJOR.MINOR; and the module zip. It prints the values Producer Portal needs. Keep them.

The same MAJOR.MINOR again overwrites that release. That is how a CVE rebuild of a patch release is published.

3. Test before Producer Portal

make gcp-marketplace-sidecar-test VERSION=$VERSION CLUSTER_NAME=... CLUSTER_LOCATION=...

Installs what step 2 pushed, through the same Terraform module Marketplace runs, on an existing GKE cluster, with an upstream that does not exist. The pod must go ready anyway (/healthz does not need the upstream). Then it removes the install. CREATE_CLUSTER=1 makes an Autopilot cluster instead; that alone takes about 10 minutes. KEEP=1 leaves the install for a manual look.

Run test with a command timeout of at least 30 minutes. An interrupted run leaves cloud resources behind and its state in dist/gcp-marketplace-test-<VERSION>/; the next test refuses to start until that state is destroyed. A cluster still being created when the run stopped is not in the state: wait for it to be RUNNING, terraform import it as google_container_cluster.sidecar[0], then apply and destroy there.

The cluster's nodes must be able to pull from the private repository: a cluster in the partner project can.

Do not continue to step 4 on a failed test. Report the error.

4. Producer Portal (the operator does this)

Tell the operator, with the values from step 2:

  1. Producer Portal → the sidecar product → Deployment configuration.
  2. Specify Helm chart: the chart URL.
  3. Image release → Specify releases → new release: display tag MAJOR.MINOR, a title, a one-line description, and the module's gs:// path. Make it the default release, and delete releases whose image failed a scan: validation checks every listed release.
  4. Save and validate. Marketplace runs terraform plan with marketplace_test.tfvars and scans the images; it takes up to two hours. After uploading a zip again under the same path, select the module again in the release: Producer Portal can keep validating the older copy.
  5. Submit for review only when the operator wants it public.

Report

The release, the image digest (crane digest <image>:<VERSION>), the chart tag, the module path, and the test result. Nothing else.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.