Skip to content

Simplify options for when to deploy

The current options for choosing when to deploy (push, or trigger) are quite verbose, with multiple options to enable/disable each of tags, the default branch, or all branches.

It might be easier on the user to simplify this into a multiple-choice single option push_when (trigger_when for triggers, or deploy_when for a higher-level end-to-end all component) that can take one of the following options:

  • tags - only act for project tags
  • default - only act for project tags and commits to the default branch
  • all - act for project tags and commits to all branches

E.g:

include:
  # build/scan/push
  - component: $CI_SERVER_FQDN/computing/gitlab/components/docker/all@main
    inputs:
      ...
      # deploy (push and trigger) from tags
      deploy_when: tags
      ...