Difference between revisions of "GitLab, when:"

From wikieduonline
Jump to navigation Jump to search
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{lc}}
+
https://docs.gitlab.com/ee/ci/yaml/#when
* https://docs.gitlab.com/ee/ci/yaml/#when
+
* <code>on_success:</code> (default) Run the job only when all jobs in earlier stages succeed or have <code>[[allow_failure]]: true</code>.
* <code>on_success</code> (default) Run the job only when all jobs in earlier stages succeed or have allow_failure: true.
+
* <code>[[GitLab CI, when: manual|manual]]:</code> Run the job only when triggered manually.
* <code>manual</code> Run the job only when triggered manually.
 
 
* <code>always:</code> Run the job regardless of the status of jobs in earlier stages. Can also be used in workflow:rules.
 
* <code>always:</code> Run the job regardless of the status of jobs in earlier stages. Can also be used in workflow:rules.
 
* <code>on_failure:</code> Run the job only when at least one job in an earlier stage fails.
 
* <code>on_failure:</code> Run the job only when at least one job in an earlier stage fails.
Line 8: Line 7:
 
*  <code>never:</code> Don’t run the job. Can only be used in a rules section or workflow: rules.
 
*  <code>never:</code> Don’t run the job. Can only be used in a rules section or workflow: rules.
  
 +
https://docs.gitlab.com/ee/ci/yaml/#retrywhen
 +
[[retry:]]
 +
    [[when:]]
 +
      - [[runner_system_failure]]
 +
      - [[stuck_or_timeout_failure]]
 +
      - [[job_execution_timeout]]
 +
      - [[scheduler_failure]]
  
 
== Related ==
 
== Related ==
* [[GitHub Actions: on:]]
+
* [[GitHub Actions]]: <code>[[GitHub Actions: on:|on:]]</code>
 +
* {{when}}
 +
* <code>[[needs:]]</code>
  
 
== See also ==
 
== See also ==
Line 16: Line 24:
  
 
[[Category:GitLab]]
 
[[Category:GitLab]]
 +
[[Category:GitLab CI]]

Latest revision as of 08:30, 14 November 2022

https://docs.gitlab.com/ee/ci/yaml/#when

  • on_success: (default) Run the job only when all jobs in earlier stages succeed or have allow_failure: true.
  • manual: Run the job only when triggered manually.
  • always: Run the job regardless of the status of jobs in earlier stages. Can also be used in workflow:rules.
  • on_failure: Run the job only when at least one job in an earlier stage fails.
  • delayed: Delay the execution of a job for a specified duration.
  • never: Don’t run the job. Can only be used in a rules section or workflow: rules.
https://docs.gitlab.com/ee/ci/yaml/#retrywhen
retry:
   when:
     - runner_system_failure
     - stuck_or_timeout_failure
     - job_execution_timeout
     - scheduler_failure

Related[edit]

See also[edit]

Advertising: