Skip to content

Manual actions to trigger pipeline jobs

Description including problem, use cases, benefits, and/or goals

Developers and Ops want to be able to manually trigger a action (which can be a deployment to a specific environment). For example, after a commit is made to master, a staging instance is automatically deployed, but production is triggered manually after user-acceptance or other testing happens.

Users want to be able to configure the deployments steps in .gitlab-ci.yml, but trigger it via API, CLI, and web UI. This provides benefits such as having configuration be version controlled and deploys be repeatable.

Users want to be able to look at the current status of the environments before triggering the deploys, therefore it makes sense to provide that action alongside a view of the environments.

Users want to be able to look at the status of a build/test run before triggering the deploys, therefore it makes sense to provide that action alongside builds/jobs in the new Stages view. I don't believe they need the action in the Jobs view.

Proposal

  1. Add manual as a possible option to when.
  2. Add an interface to trigger a manual action from the Pipelines page
  3. Add an interface to trigger a manual action from the Environments page

Example:

production:
  stage: deploy
  script: run-deployment $OMNIBUS_GITLAB_PACKAGE
  environment: production
  when: manual

Links / references