Enhance README to clarify GCP Bucket and staging workspace generation rules
Updated the README to provide clearer descriptions for the `gcp-bucket-crossplane-health` and `stg-workspace-smoke` code bundles. The `gcp-bucket-crossplane-health` now specifies its focus on Kubernetes platform and k8s-kubectl-cmd runtime, while the `stg-workspace-smoke` is noted for its integration of runwhen and tool-builder runtime. This improves documentation clarity for users regarding the purpose and structure of these bundles.
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
# Staging Workspace Smoke Check
|
||||
|
||||
Verify tool-builder runtime can execute a simple custom task against the stg-test workspace.
|
||||
|
||||
**Bundle:** `stg-workspace-smoke` · **Task title:** `Run staging workspace smoke check` ·
|
||||
**Runtime:** tool-builder (python)
|
||||
|
||||
## When this SLX gets created
|
||||
|
||||
- **Platform:** `runwhen` — workspace-builder matches RunWhen platform resources
|
||||
- **Resource types:** `workspace`
|
||||
- **Match rules (plain English):**
|
||||
- matches every resource (pattern `.+` on name)
|
||||
- **Expected cardinality:** one SLX per matched resource, named `<qualifiers>-stg-smoke`
|
||||
- **Qualifiers:** `workspace`
|
||||
|
||||
## What this SLX does
|
||||
|
||||
The task runs a python script via the shared `tool-builder` codebundle in
|
||||
`rw-generic-codecollection`. The workspace-builder renders the TaskSet template with
|
||||
a base64-encoded `GEN_CMD` at deploy time; this file shows the decoded script for review.
|
||||
|
||||
### Script (decoded)
|
||||
|
||||
```python
|
||||
import os
|
||||
|
||||
|
||||
def main():
|
||||
workspace = os.environ.get("WORKSPACE_NAME", "unknown")
|
||||
location = os.environ.get("LOCATION_NAME", "unknown")
|
||||
return [
|
||||
{
|
||||
"issue title": "Staging smoke check passed",
|
||||
"issue description": (
|
||||
f"Tool-builder smoke script ran on workspace={workspace} "
|
||||
f"location={location}."
|
||||
),
|
||||
"issue severity": 4,
|
||||
"issue next steps": (
|
||||
"No action required — this is an informational smoke test."
|
||||
),
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Environment variables
|
||||
|
||||
| Name | Value | Notes |
|
||||
|---|---|---|
|
||||
| _(none)_ | | |
|
||||
|
||||
|
||||
### Secrets (names only — values live in RunWhen workspace secrets)
|
||||
|
||||
| Name | Required |
|
||||
|---|---|
|
||||
| _(none)_ | no |
|
||||
|
||||
|
||||
### Runtime variables (user-supplied at run time)
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| _(none)_ | | |
|
||||
|
||||
|
||||
## Operational metadata
|
||||
|
||||
- **Timeout:** 300s
|
||||
- **Access:** `read-only` · **Data:** `logs-bulk`
|
||||
- **Owners:** {{workspace.owner_email}}
|
||||
|
||||
## Provenance
|
||||
|
||||
- Generated by `runwhen-platform-mcp` `render_codecollection_skill` vlocal-e2e-test
|
||||
- Source workspace: `stg-test`
|
||||
- Generated at: `2026-07-02T21:13:33Z`
|
||||
|
||||
## Deploying this codecollection
|
||||
|
||||
Add to your runwhen-local runner `workspaceInfo.yaml`:
|
||||
|
||||
```yaml
|
||||
codeCollections:
|
||||
- repoURL: https://<host>/<org>/<your-private-codecollection>.git
|
||||
ref: main
|
||||
```
|
||||
|
||||
Then reconcile (Flux example):
|
||||
|
||||
```bash
|
||||
flux reconcile hr runwhen-local -n <runner-namespace> --with-source
|
||||
```
|
||||
|
||||
> **Requires runwhen-local with `platform: runwhen` support** (RW-1355). Until that
|
||||
> release lands, generation rules using `platform: runwhen` will not render SLXs.
|
||||
@@ -0,0 +1,23 @@
|
||||
apiVersion: runwhen.com/v1
|
||||
kind: GenerationRules
|
||||
spec:
|
||||
platform: runwhen
|
||||
generationRules:
|
||||
- resourceTypes:
|
||||
- workspace
|
||||
matchRules:
|
||||
- type: pattern
|
||||
pattern: .+
|
||||
properties:
|
||||
- name
|
||||
mode: substring
|
||||
slxs:
|
||||
- baseName: stg-smoke
|
||||
qualifiers:
|
||||
- workspace
|
||||
baseTemplateName: stg-workspace-smoke
|
||||
levelOfDetail: detailed
|
||||
outputItems:
|
||||
- type: slx
|
||||
- type: runbook
|
||||
templateName: stg-workspace-smoke-taskset.yaml
|
||||
@@ -0,0 +1,27 @@
|
||||
apiVersion: runwhen.com/v1
|
||||
kind: ServiceLevelX
|
||||
metadata:
|
||||
name: {{slx_name}}
|
||||
labels:
|
||||
{% include "common-labels.yaml" %}
|
||||
annotations:
|
||||
{% include "common-annotations.yaml" %}
|
||||
spec:
|
||||
imageURL: https://storage.googleapis.com/runwhen-nonprod-shared-images/icons/runwhen.svg
|
||||
alias: Staging Workspace Smoke Check
|
||||
asMeasuredBy: >-
|
||||
Tool Builder task via rw-generic-codecollection tool-builder runtime.
|
||||
owners:
|
||||
- {{workspace.owner_email}}
|
||||
statement: >-
|
||||
Verify tool-builder runtime can execute a simple custom task against the
|
||||
stg-test workspace.
|
||||
additionalContext:
|
||||
qualified_name: "{{ match_resource.qualified_name }}"
|
||||
tags:
|
||||
- name: platform
|
||||
value: runwhen
|
||||
- name: access
|
||||
value: read-only
|
||||
- name: data
|
||||
value: logs-bulk
|
||||
@@ -0,0 +1,27 @@
|
||||
apiVersion: runwhen.com/v1
|
||||
kind: Runbook
|
||||
metadata:
|
||||
name: {{slx_name}}
|
||||
labels:
|
||||
{% include "common-labels.yaml" %}
|
||||
annotations:
|
||||
{% include "common-annotations.yaml" %}
|
||||
spec:
|
||||
location: {{default_location}}
|
||||
codeBundle:
|
||||
repoUrl: http://rw-airgap-cc-catalog-svc.runwhen-env-airgap:8080/git/rw-generic-codecollection.git
|
||||
ref: main
|
||||
pathToRobot: codebundles/tool-builder/runbook.robot
|
||||
configProvided:
|
||||
- name: TASK_TITLE
|
||||
value: 'Run staging workspace smoke check'
|
||||
- name: GEN_CMD
|
||||
value: 'aW1wb3J0IG9zCgoKZGVmIG1haW4oKToKICAgIHdvcmtzcGFjZSA9IG9zLmVudmlyb24uZ2V0KCJXT1JLU1BBQ0VfTkFNRSIsICJ1bmtub3duIikKICAgIGxvY2F0aW9uID0gb3MuZW52aXJvbi5nZXQoIkxPQ0FUSU9OX05BTUUiLCAidW5rbm93biIpCiAgICByZXR1cm4gWwogICAgICAgIHsKICAgICAgICAgICAgImlzc3VlIHRpdGxlIjogIlN0YWdpbmcgc21va2UgY2hlY2sgcGFzc2VkIiwKICAgICAgICAgICAgImlzc3VlIGRlc3JpcHRpb24iOiAoCiAgICAgICAgICAgICAgICBmIlRvb2wtYnVpbGRlciBzbW9rZSBzY3JpcHQgcmFuIG9uIHdvcmtzcGFjZT17d29ya3NwYWNlfSAiCiAgICAgICAgICAgICAgICBmImxvY2F0aW9uPXtsb2NhdGlvbn0uIgogICAgICAgICAgICApLAogICAgICAgICAgICAiaXNzdWUgc2V2ZXJpdHkiOiA0LAogICAgICAgICAgICAiaXNzdWUgbmV4dCBzdGVwcyI6ICgKICAgICAgICAgICAgICAgICJObyBhY3Rpb24gcmVxdWlyZWQg4oCUIHRoaXMgaXMgYW4gaW5mb3JtYXRpb25hbCBzbW9rZSB0ZXN0LiIKICAgICAgICAgICAgKSwKICAgICAgICB9CiAgICBdCg=='
|
||||
- name: INTERPRETER
|
||||
value: 'python'
|
||||
- name: CONFIG_ENV_MAP
|
||||
value: '{}'
|
||||
- name: SECRET_ENV_MAP
|
||||
value: '[]'
|
||||
- name: TIMEOUT_SECONDS
|
||||
value: '300'
|
||||
@@ -0,0 +1,26 @@
|
||||
# stg-workspace-smoke
|
||||
|
||||
Custom Discovery CodeCollection bundle generated from MCP tool-builder output.
|
||||
|
||||
- **Alias:** Staging Workspace Smoke Check
|
||||
- **Platform:** `runwhen`
|
||||
- **Resource types:** workspace
|
||||
|
||||
## Layout
|
||||
|
||||
```
|
||||
.runwhen/
|
||||
README.md # Human-readable review (decoded script + match rules)
|
||||
generation-rules/
|
||||
stg-workspace-smoke.yaml
|
||||
templates/
|
||||
stg-workspace-smoke-slx.yaml
|
||||
stg-workspace-smoke-taskset.yaml
|
||||
```
|
||||
|
||||
See `.runwhen/README.md` for the full review artifact intended for PR reviewers.
|
||||
|
||||
## References
|
||||
|
||||
- [Custom Discovery CodeCollection guide](https://docs.runwhen.com/guides/custom-discovery-codecollection/)
|
||||
- [Tool Builder Runtime guide](https://docs.runwhen.com/guides/tool-builder-runtime/)
|
||||
Reference in New Issue
Block a user