ambient-pr-test
Skill131 starsChanged 6 months agoMITView on GitHub
Deploy a PR's images (api-server, control-plane, runner) to any OpenShift namespace for integration testing. Works on both standard OpenShift clusters and MPP managed clusters. Auto-detects the environment and chooses the right script.
- Reads credentials
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- alignSkill
- amber-reviewSkill
- workflowSkill
- ambientSkill
- dev-clusterSkill
- deploySkill
- devflowSkill
- discoverSkill
- cypress-demoSkill
- frontend-developmentSkill
- grpc-devSkill
- unleash-flagSkill
- memorySkill
- pr-fixerSkill
- scaffoldSkill
- ambient-api-serverSkill
- specSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 109
Check quay.io for the tag: https://quay.io/repository/ambient_code/vteam_control_plane?tab=tags
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Ambient PR Test Skill
Deploy PR-tagged Ambient images into an OpenShift namespace for integration testing.
Invoke with a PR URL:
with skills/control-plane/ambient-pr-test https://github.com/ambient-code/platform/pull/1599Optional modifiers:
--keep-alive— skip teardowndeploy-only/teardown-only— single phase--namespace <ns>— target namespace (defaults to current project)
Environment Detection
if oc api-resources --api-group=tenant.paas.redhat.com 2>/dev/null < /dev/null | grep -q TenantNamespace; then
echo "MPP" # use provision.sh + install.sh
else
echo "Standard" # use install-standard.sh
fi| Standard OpenShift | MPP | |
| Namespace | Pre-existing | Created via TenantNamespace CR |
| Script | install-standard.sh | provision.sh + install.sh |
| Auth | Development (no JWT) | Production (RH SSO JWT) |
| Secrets | Auto-generated | Copied from runtime-int |
Standard OpenShift
For any cluster where you have oc access and an existing namespace.
Prerequisites
oclogged in with create permissions for deployments, services, routes, secrets, ClusterRoles- Existing namespace (e.g.
mturansk) - PR images at
quay.io/ambient_code/vteam_*:pr-<NUMBER>
Deploy
PR_NUMBER=1599
NAMESPACE=$(oc project -q)
bash components/pr-test/install-standard.sh "$NAMESPACE" "pr-${PR_NUMBER}"The script:
- Creates DB and app secrets (auto-generated)
- Creates CP ServiceAccount + ClusterRole + ClusterRoleBinding
- Deploys PostgreSQL, api-server (dev mode), control-plane (standard mode)
- Creates Route (auto-assigned
.apps.*host) - Waits for rollouts, smoke-checks health
Verify
API_HOST=$(oc get route ambient-api-server -n "$NAMESPACE" -o jsonpath='{.spec.host}')
curl -sk "https://${API_HOST}/api/ambient"
acpctl login --url "https://${API_HOST}"Teardown
NAMESPACE=$(oc project -q)
oc delete deployment,svc,route,configmap,secret -l app=ambient-api-server -n "$NAMESPACE"
oc delete deployment,svc -l app=ambient-control-plane -n "$NAMESPACE"
oc delete secret ambient-control-plane-token ambient-cp-token-keypair -n "$NAMESPACE" --ignore-not-found
oc delete clusterrole,clusterrolebinding "ambient-control-plane-${NAMESPACE}" --ignore-not-foundMPP Workflow
For MPP clusters (dev-spoke-aws-us-east-1). See components/pr-test/MPP-ENVIRONMENT.md.
PR_NUMBER=1005; ID="pr-${PR_NUMBER}"
bash components/pr-test/build.sh "https://github.com/ambient-code/platform/pull/${PR_NUMBER}"
bash components/pr-test/provision.sh create "$ID"
bash components/pr-test/install.sh "ambient-code--${ID}" "pr-${PR_NUMBER}"
# teardown:
bash components/pr-test/provision.sh destroy "$ID"Troubleshooting
Images not found
Check quay.io for the tag: https://quay.io/repository/ambient_code/vteam_control_plane?tab=tags
CP can't reach api-server
oc get deployment ambient-control-plane -n "$NAMESPACE" \
-o jsonpath='{.spec.template.spec.containers[0].env}' | python3 -m json.tool | grep AMBIENTJWT errors in standard mode
Verify AMBIENT_ENV=development:
oc get deployment ambient-api-server -n "$NAMESPACE" \
-o jsonpath='{.spec.template.spec.containers[?(@.name=="api-server")].env[?(@.name=="AMBIENT_ENV")].value}'Route not resolving
oc get route ambient-api-server -n "$NAMESPACE" -o jsonpath='{.spec.host}'CP keypair secret
Auto-generated on first start as ambient-cp-token-keypair. Check CP logs:
oc logs deployment/ambient-control-plane -n "$NAMESPACE" | grep keypairBuild fails
docker login quay.io # or: podman login quay.ioDoes 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
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.

