You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fcdf872
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CLAUDE.md
+17-9Lines changed: 17 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,18 +16,26 @@ This is the OpenShift Dedicated managed-scripts repository, containing scripts e
16
16
-`make pyflakes` - Run pyflakes on all .py files
17
17
18
18
### Testing with Backplane
19
-
Scripts are tested using the Backplane CLI:
19
+
The `testjob create`, `get`, and `logs` subcommands are deprecated. Use `ocm backplane testjob render` to generate Kubernetes YAML (ServiceAccount, RBAC, and Pod) locally, then apply it with `oc` on a non-production cluster where you have `cluster-admin` access:
20
20
```bash
21
-
#Connect to stage environment
22
-
ocm backplane config set url https://api.stage.backplane.openshift.com
23
-
ocm backplane login <stage-cluster-id>
21
+
#Log in to a non-production cluster with cluster-admin (normal IDP login; no backplane login needed)
22
+
# Replace the API URL with your cluster's.
23
+
oc login https://api.example.openshift.com:6443
24
24
25
-
# Test a script
26
-
ocm backplane testjob create [-p var1=val1]
25
+
# Render the test job YAML from the script directory (contains metadata.yaml + the script)
26
+
# If the script requires parameters, add them with -p (repeatable), e.g. -p var1=value
27
+
cd scripts/CEE/new-script
28
+
ocm backplane testjob render > test-job.yaml
27
29
28
-
# Check status and logs
29
-
ocm backplane testjob get <job-id>
30
-
ocm backplane testjob logs <job-id>
30
+
# Review, then apply
31
+
oc apply -f test-job.yaml
32
+
33
+
# Watch / inspect with standard oc (replace the pod name with the one from the previous step)
34
+
oc -n openshift-backplane-managed-scripts get pods
4.Access to the [Stage API](https://api.stage.backplane.openshift.com)
23
+
4.A non-production cluster where you have `cluster-admin` access to test on
24
24
25
25
All pre-existing scripts can be found [here](https://github.com/openshift/managed-scripts/tree/main/scripts) for reference.
26
26
@@ -60,44 +60,50 @@ All pre-existing scripts can be found [here](https://github.com/openshift/manage
60
60
61
61
## Testing the Script
62
62
63
-
1.**Ensure You Are Using the Stage API**
64
-
```sh
65
-
ocm backplane config set url https://api.stage.backplane.openshift.com
66
-
ocm backplane config get url
67
-
```
68
-
Output:
69
-
```
70
-
url: https://api.stage.backplane.openshift.com
71
-
```
63
+
The `ocm backplane testjob create`, `get`, and `logs` commands are deprecated. Use `ocm backplane testjob render` instead, which generates the Kubernetes YAML (ServiceAccount, RBAC, and Pod) for your draft script locally — no backplane API call is made. You then apply it directly with `oc` on a non-production cluster where you have `cluster-admin` access, and use plain `oc` to watch, inspect, and clean up.
72
64
73
-
2.**Connect to a Stage Cluster**
65
+
1.**Log In to a Non-Production Cluster**
66
+
- Use a normal IDP login to a non-production cluster where you have `cluster-admin` access (no `ocm backplane login` needed).
67
+
- Replace `https://api.example.openshift.com:6443` with your cluster's API URL.
74
68
```sh
75
-
ocm backplane login <stage-cluster-id>
69
+
oc login https://api.example.openshift.com:6443
76
70
```
77
71
78
-
3.**Run a Test Job**
72
+
2.**Render the Test Job YAML**
73
+
- Run this from the script directory (which contains `metadata.yaml` and the script).
79
74
```sh
80
-
ocm backplane testjob create [-p var1=val1]
75
+
cd scripts/CEE/new-script
76
+
ocm backplane testjob render > test-job.yaml
81
77
```
82
-
Example Output:
78
+
- If your script requires parameters, pass them with `-p` (repeatable):
0 commit comments