Add the key word "rule:allow_failure" and "rule: when" to CI/CD Job Assistant and add instructions.
Problem to solve
Users need an option to config the key word "rule:allow_failure" and "rule: when" in the CI/CD Job Assistant. There also should be instructions on how to config each key word.
Proposal
Rule collapse
Add the key word "rule:allow_failure" in the CI/CD Job Assistant
Add a collapse "Rule" in the Job Assistant drawer.
Add a checkbox "Allow failure". The default status is unchecked.
If the option is checked, add the key word to the job, otherwise no operation is performed.
rule:allow_failure
yaml
Add the key word "rule:when" in the CI/CD Job Assistant
Add three forms in the "Rule" collapse, i.e., "When", "Start in" and "Unit".
The default value of the "When" is on_success. Other values include manual, always, on_failure, delayed and never.
If delayed is selected, users need to config "Start in" and "Unit", otherwise these two key words should not be accessible. The default value of "Unit" is Seconds. Other values include Minutes, Day and Week. The minimum value is 1 second and the maximum is 1 week. If the input is invalid, e.g., out of the range, warn the user and stop users from saving the configuration.
If the default option is changed, add the key word to the job, otherwise no operation is performed.