.package-and-qa-base:
  image: ruby:2.6-alpine
  stage: qa
  dependencies: []
  variables:
    GIT_DEPTH: "1"
  retry: 0
  script:
    - source scripts/utils.sh
    - install_gitlab_gem
    - ./scripts/trigger-build omnibus
  only:
    refs:
      - branches@gitlab-org/gitlab-ce
      - branches@gitlab-org/gitlab-ee

package-and-qa-manual:
  extends: .package-and-qa-base
  except:
    refs:
      - master
      - /(^docs[\/-].+|.+-docs$)/
      - /(^qa[\/-].*|.*-qa$)/
  when: manual
  needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]

package-and-qa-manual:master:
  extends: .package-and-qa-base
  only:
    refs:
      - master
  when: manual
  needs: ["build-qa-image", "gitlab:assets:compile"]

package-and-qa:
  extends: .package-and-qa-base
  only:
    refs:
      - /(^qa[\/-].*|.*-qa$)/@gitlab-org/gitlab-ce
      - /(^qa[\/-].*|.*-qa$)/@gitlab-org/gitlab-ee
  needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
  allow_failure: true

.package-and-qa-base:
  image: ruby:2.6-alpine
  stage: qa
  dependencies: []
  variables:
    GIT_DEPTH: "1"
  retry: 0
  script:
    - source scripts/utils.sh
    - install_gitlab_gem
    - ./scripts/trigger-build omnibus
  only:
    refs:
      - branches@gitlab-org/gitlab-ce
      - branches@gitlab-org/gitlab-ee

package-and-qa-manual:
  extends: .package-and-qa-base
  except:
    refs:
      - master
      - /(^docs[\/-].+|.+-docs$)/
      - /(^qa[\/-].*|.*-qa$)/
  when: manual
  needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]

package-and-qa-manual:master:
  extends: .package-and-qa-base
  only:
    refs:
      - master@gitlab-org/gitlab-ce
      - master@gitlab-org/gitlab-ee
  when: manual
  needs: ["build-qa-image", "gitlab:assets:compile"]

package-and-qa:
  extends: .package-and-qa-base
  only:
    refs:
      - /(^qa[\/-].*|.*-qa$)/@gitlab-org/gitlab-ce
      - /(^qa[\/-].*|.*-qa$)/@gitlab-org/gitlab-ee
  needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
  allow_failure: true

Make the 'package-and-qa-manual:master' job only run on .com
Make the 'package-and-qa-manual:master' job only run on .com

Signed-off-by: Rémy Coutable <4ea0184b9df19e0786dd00b28e6daa4d26baeb3e@rymai.me>
