updated examples
This commit is contained in:
+11
-28
@@ -5,6 +5,12 @@
|
||||
**Bundle:** `stg-workspace-smoke` · **Task title:** `Run staging workspace smoke check` ·
|
||||
**Runtime:** tool-builder (python)
|
||||
|
||||
> **Review artifact:** See `raw_script.py` in this directory
|
||||
> for the decoded script content that reviewers and automated systems should
|
||||
> inspect. Do **not** parse the base64-encoded `GEN_CMD` in the TaskSet template
|
||||
> for review purposes — use this SKILL_TEMPLATE.md and the accompanying
|
||||
> `raw_script.py` file instead.
|
||||
|
||||
## When this SLX gets created
|
||||
|
||||
- **Platform:** `runwhen` — workspace-builder matches RunWhen platform resources
|
||||
@@ -18,31 +24,8 @@
|
||||
|
||||
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."
|
||||
),
|
||||
}
|
||||
]
|
||||
```
|
||||
a base64-encoded `GEN_CMD` at deploy time; the decoded script is available in
|
||||
`raw_script.py` in this directory for review.
|
||||
|
||||
### Environment variables
|
||||
|
||||
@@ -69,13 +52,13 @@ def main():
|
||||
|
||||
- **Timeout:** 300s
|
||||
- **Access:** `read-only` · **Data:** `logs-bulk`
|
||||
- **Owners:** {{workspace.owner_email}}
|
||||
- **Owners:** shea@runwhen.com
|
||||
|
||||
## Provenance
|
||||
|
||||
- Generated by `runwhen-platform-mcp` `render_codecollection_skill` vlocal-e2e-test
|
||||
- Generated by `runwhen-platform-mcp` `render_codecollection_skill` v0.0.0-dev
|
||||
- Source workspace: `stg-test`
|
||||
- Generated at: `2026-07-02T21:13:33Z`
|
||||
- Generated at: `2026-07-06T19:23:12Z`
|
||||
|
||||
## Deploying this codecollection
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
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."
|
||||
),
|
||||
}
|
||||
]
|
||||
@@ -1,27 +1,26 @@
|
||||
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
|
||||
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
|
||||
|
||||
+24
-19
@@ -1,27 +1,32 @@
|
||||
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'
|
||||
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: https://github.com/runwhen-contrib/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: 'aW1wb3J0IG9zCgoKZGVmIG1haW4oKToKICAgIHdvcmtzcGFjZSA9IG9zLmVudmlyb24uZ2V0KCJXT1JLU1BBQ0VfTkFNRSIsICJ1bmtub3duIikKICAgIGxvY2F0aW9uID0gb3MuZW52aXJvbi5nZXQoIkxPQ0FUSU9OX05BTUUiLCAidW5rbm93biIpCiAgICByZXR1cm4gWwogICAgICAgIHsKICAgICAgICAgICAgImlzc3VlIHRpdGxlIjogIlN0YWdpbmcgc21va2UgY2hlY2sgcGFzc2VkIiwKICAgICAgICAgICAgImlzc3VlIGRlc2NyaXB0aW9uIjogKAogICAgICAgICAgICAgICAgZiJUb29sLWJ1aWxkZXIgc21va2Ugc2NyaXB0IHJhbiBvbiB3b3Jrc3BhY2U9e3dvcmtzcGFjZX0gIgogICAgICAgICAgICAgICAgZiJsb2NhdGlvbj17bG9jYXRpb259LiIKICAgICAgICAgICAgKSwKICAgICAgICAgICAgImlzc3VlIHNldmVyaXR5IjogNCwKICAgICAgICAgICAgImlzc3VlIG5leHQgc3RlcHMiOiAoCiAgICAgICAgICAgICAgICAiTm8gYWN0aW9uIHJlcXVpcmVkIOKAlCB0aGlzIGlzIGFuIGluZm9ybWF0aW9uYWwgc21va2UgdGVzdC4iCiAgICAgICAgICAgICksCiAgICAgICAgfQogICAgXQo='
|
||||
value: aW1wb3J0IG9zCgoKZGVmIG1haW4oKToKICAgIHdvcmtzcGFjZSA9IG9zLmVudmlyb24uZ2V0KCJXT1JLU1BBQ0VfTkFNRSIsICJ1bmtub3duIikKICAgIGxvY2F0aW9uID0gb3MuZW52aXJvbi5nZXQoIkxPQ0FUSU9OX05BTUUiLCAidW5rbm93biIpCiAgICByZXR1cm4gWwogICAgICAgIHsKICAgICAgICAgICAgImlzc3VlIHRpdGxlIjogIlN0YWdpbmcgc21va2UgY2hlY2sgcGFzc2VkIiwKICAgICAgICAgICAgImlzc3VlIGRlc2NyaXB0aW9uIjogKAogICAgICAgICAgICAgICAgZiJUb29sLWJ1aWxkZXIgc21va2Ugc2NyaXB0IHJhbiBvbiB3b3Jrc3BhY2U9e3dvcmtzcGFjZX0gIgogICAgICAgICAgICAgICAgZiJsb2NhdGlvbj17bG9jYXRpb259LiIKICAgICAgICAgICAgKSwKICAgICAgICAgICAgImlzc3VlIHNldmVyaXR5IjogNCwKICAgICAgICAgICAgImlzc3VlIG5leHQgc3RlcHMiOiAoCiAgICAgICAgICAgICAgICAiTm8gYWN0aW9uIHJlcXVpcmVkIOKAlCB0aGlzIGlzIGFuIGluZm9ybWF0aW9uYWwgc21va2UgdGVzdC4iCiAgICAgICAgICAgICksCiAgICAgICAgfQogICAgXQ==
|
||||
...
|
||||
- name: INTERPRETER
|
||||
value: 'python'
|
||||
value: python
|
||||
...
|
||||
- name: CONFIG_ENV_MAP
|
||||
value: '{}'
|
||||
- name: SECRET_ENV_MAP
|
||||
value: '[]'
|
||||
- name: TIMEOUT_SECONDS
|
||||
value: '300'
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ Custom Discovery CodeCollection bundle generated from MCP tool-builder output.
|
||||
|
||||
```
|
||||
.runwhen/
|
||||
README.md # Human-readable review (decoded script + match rules)
|
||||
SKILL_TEMPLATE.md # Human-readable review (decoded script + match rules)
|
||||
raw_script.py # Decoded script for reviewers and automated inspection
|
||||
generation-rules/
|
||||
stg-workspace-smoke.yaml
|
||||
templates/
|
||||
@@ -18,7 +19,8 @@ Custom Discovery CodeCollection bundle generated from MCP tool-builder output.
|
||||
stg-workspace-smoke-taskset.yaml
|
||||
```
|
||||
|
||||
See `.runwhen/README.md` for the full review artifact intended for PR reviewers.
|
||||
See `.runwhen/SKILL_TEMPLATE.md` and `.runwhen/raw_script.py` for the review
|
||||
artifacts intended for PR reviewers and automated systems.
|
||||
|
||||
## References
|
||||
|
||||
|
||||
Reference in New Issue
Block a user