-
Notifications
You must be signed in to change notification settings - Fork 2k
step-registry/sandboxed-containers-operator: Make create-prowjob-commands.sh to run jobs #69967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
step-registry/sandboxed-containers-operator: Make create-prowjob-commands.sh to run jobs #69967
Conversation
|
@wainersm, Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
ci-operator/step-registry/sandboxed-containers-operator/create-prowjob/lib.sh
Outdated
Show resolved
Hide resolved
...-containers-operator/create-prowjob/sandboxed-containers-operator-create-prowjob-commands.sh
Show resolved
Hide resolved
...-containers-operator/create-prowjob/sandboxed-containers-operator-create-prowjob-commands.sh
Show resolved
Hide resolved
...-containers-operator/create-prowjob/sandboxed-containers-operator-create-prowjob-commands.sh
Show resolved
Hide resolved
| echo "" | ||
| echo "Triggering jobs..." | ||
|
|
||
| API_ENDPOINT="https://gangway-ci.apps.ci.l2s4.p1.openshiftapps.com/v1/executions" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this ever change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good question, I'd suggest moving this at the beginning of the file (or at least function) to simplify changing this value if needed (along with short comment explaining where to get the value from)
| DO NOT EDIT DIRECTLY. | ||
| This is generated by the sandboxed-containers-operator-create-prowjob-commands.sh script. | ||
| # DO NOT EDIT DIRECTLY. | ||
| # This is generated by the sandboxed-containers-operator-create-prowjob-commands.sh script. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, documentation is only supported for steps/workflows and such, not the generated jobs.
| # script to create prowjobs in ci-operator/config/openshift/sandboxed-containers-operator using environment variables. | ||
| # Usage: ./sandboxed-containers-operator-create-prowjob-commands.sh | ||
| # Usage: | ||
| # ./sandboxed-containers-operator-create-prowjob-commands.sh gen # Generate prowjob configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be "create" and not "gen"
| @@ -0,0 +1,99 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless something changed prow doesn't allow other files than $prefix-$tool (so only sandboxed-containers-operator-create-prowjob-commands.sh and such). So I don't think we can create a lib here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I struggled with this with upstream as well so if that changed I'm all in)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it doesn't. I will need to delete the lib.sh file and return the functions to the script :(
696fdb3 to
9ad2c9a
Compare
…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]>
…eate-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]>
…e-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]>
…rom 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]>
9ad2c9a to
fc1e75f
Compare
|
Rebased and fixed a shellcheck warn. |
|
[REHEARSALNOTIFIER] Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
@wainersm: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tbuskey, wainersm The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…ands.sh to run jobs (openshift#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]>
…ands.sh to run jobs (openshift#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]>
Made a major refactor of create-prowjob-commands.sh to also allow to trigger jobs using the Prow API.
Here is the new usage of the script: