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

package-and-qa-manual:
  extends:
    - .package-and-qa-base
    - .except-docs-qa
  when: manual

package-and-qa:
  extends: .package-and-qa-base
  allow_failure: true
  only:
    - /(^qa[\/-].*|.*-qa$)/@gitlab-org/gitlab-ce
    - /(^qa[\/-].*|.*-qa$)/@gitlab-org/gitlab-ee

.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:
    - branches@gitlab-org/gitlab-ce
    - branches@gitlab-org/gitlab-ee
  except:
    - master

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

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

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

Introduce a new 'package-and-qa-manual:master' job
Introduce a new 'package-and-qa-manual:master' job

This is needed because in `master`, the `gitlab:assets:compile` is
created, but not the `gitlab:assets:compile pull-cache` job, and the
`needs` keyword cannot take jobs that don't exist, thus we have to
create a dedicated job for `master`, with `needs: ["build-qa-image",
"gitlab:assets:compile"]` instead of `needs: ["build-qa-image",
"gitlab:assets:compile pull-cache"]`.

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