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
step-registry/sandboxed-containers-operator: Make create-prowjob-commands.sh to run jobs (#69967)
* step-registry/sandboxed-containers-operator: create validate_and_set_defaults() in create-prowjob-commands.sh
- Extract parameter validation and default setting logic into validate_and_set_defaults() function
- Maintain all existing validation rules and error handling
Assisted-by: Cursor
Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
* step-registry/sandboxed-containers-operator: Add create command to create-prowjob-commands.sh
- Refactor script to support command-based interface
- Add 'create' command to generate prowjob configurations
- Move existing functionality into command_create() function
- Add proper command validation and usage help
- Maintain all existing functionality with improved structure
Assisted-by: Cursor
Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
* step-registry/sandboxed-containers-operator: Add run command to create-prowjob-commands.sh
- Add 'run' command as placeholder for future prowjob execution
- Update usage help to include run command
- Add command_run() function with unimplemented message
- Maintain backward compatibility with create command
Assisted-by: Cursor
Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
* step-registry/sandboxed-containers-operator: Remove "documentation" from generated prowjob
The documentation section in the generated prowjob is not valid for the
ci-operator, resulting on job run via API to fail.
Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
---------
Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
Copy file name to clipboardExpand all lines: ci-operator/step-registry/sandboxed-containers-operator/create-prowjob/README.md
+78-8Lines changed: 78 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,25 @@ This directory contains a robust script to generate OpenShift CI prowjob configu
6
6
7
7
The `sandboxed-containers-operator-create-prowjob-commands.sh` script creates prowjob configuration files for the sandboxed containers operator CI pipeline. It supports both Pre-GA (development) and GA (production) release types with intelligent catalog source management and comprehensive parameter validation.
-`sandboxed-containers-operator-create-prowjob-commands.sh` - Main script to generate prowjob configurations
12
26
- The output file is created in the current directory and named `openshift-sandboxed-containers-operator-devel__downstream-${PROW_RUN_TYPE}${OCP_VERSION}.yaml`
13
-
-`PROW_RUN_TYPE` is based on ``TEST_RELEASE_TYPE. It is `candidate` for `Pre-GA` and `release` otherwise
27
+
-`PROW_RUN_TYPE` is based on `TEST_RELEASE_TYPE`. It is `candidate` for `Pre-GA` and `release` otherwise
14
28
- If the output file exists, it will be moved to a `.backup` file
15
29
16
30
## Key Features
@@ -31,10 +45,16 @@ The script uses environment variables exclusively for configuration:
PROW_API_TOKEN=your_token_here ci-operator/step-registry/sandboxed-containers-operator/create-prowjob/sandboxed-containers-operator-create-prowjob-commands.sh run openshift-sandboxed-containers-operator-devel__downstream-candidate419.yaml
55
+
56
+
# Run specific job
57
+
PROW_API_TOKEN=your_token_here ci-operator/step-registry/sandboxed-containers-operator/create-prowjob/sandboxed-containers-operator-create-prowjob-commands.sh run openshift-sandboxed-containers-operator-devel__downstream-candidate419.yaml azure-ipi-kata
To trigger ProwJobs via the REST API, you need an authentication token. Each SSO user is entitled to obtain a personal authentication token.
261
+
262
+
### Obtaining a Token
263
+
264
+
Tokens can be retrieved through the UI of the app.ci cluster at [OpenShift Console](https://console-openshift-console.apps.ci.l2s4.p1.openshiftapps.com). Alternatively, if the app.ci cluster context is already configured, you may execute:
265
+
266
+
```bash
267
+
oc whoami -t
268
+
```
269
+
270
+
### Using the Token
271
+
272
+
Once you have obtained a token, set it as an environment variable:
273
+
274
+
```bash
275
+
export PROW_API_TOKEN=your_token_here
276
+
```
277
+
278
+
For complete information about triggering ProwJobs via REST, including permanent tokens for automation, see the [OpenShift CI documentation](https://docs.ci.openshift.org/docs/how-tos/triggering-prowjobs-via-rest/#obtaining-an-authentication-token).
0 commit comments