What's the difference between `when:manual` and `only:web` in Gitlab CI?

Viewed 1877

From the documentation:

manual: https://docs.gitlab.com/14.1/ee/ci/yaml/index.html#whenmanual

A manual job is a type of job that is not executed automatically and must be explicitly started by a user. You might want to use manual jobs for things like deploying to production.

web: https://docs.gitlab.com/14.1/ee/ci/yaml/index.html#onlyrefs--exceptrefs

For pipelines created by using Run pipeline button in the GitLab UI, from the project’s CI/CD > Pipelines section.

they seem to do the same. Just duplicated ways to do the same thing?

1 Answers

When using when: manual, your pipeline would have a job which you'd need to press a button to trigger.

enter image description here


When using only: web, this would enable you to use the Run Pipeline button from the GitLab UI CI/CD page, to create a new pipeline.

enter image description here

Related