How do I use the when: manual section in a pipeline as code?

Modified on Wed, 21 Jun 2023 at 02:57 PM

To use the when: manual section in a GitLab pipeline as code, you can define a job or a step that requires manual intervention to proceed. This can be useful when you want to pause the pipeline execution and prompt a user to manually trigger the next step.

Here's an example of how you can use the when: manual section:

  stage: deploy
    - echo "Deploying..."
  when: manual

In the above example:

The deploy job is defined in the deploy stage of the pipeline.

The script section includes the necessary deployment commands or scripts.

The when: manual section indicates that the job should wait for manual intervention before proceeding.

When this pipeline is executed, the deploy job will pause and display a manual play button in the GitLab UI. A user with appropriate permissions can manually trigger the job to continue the pipeline execution.

Using the when: manual section allows you to control the flow of your pipeline and ensure that critical steps, such as deployments, require manual approval or intervention before proceeding.

If you have further questions or need assistance with implementing the when: manual section or optimizing your pipelines, feel free to reach out to Cloud-Runner. We specialize in helping developers maximize the efficiency and performance of their CI/CD workflows. Visit to learn more about our services and how we can support your pipeline automation needs.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article