[go: up one dir, main page]

Skip to content

Multiple use templates

Proposal

Allow for templates to be used multiple times. We have projects that have multi-container built pod setups for deployment. We need way to have both containers scanned.

Currently the existing template (https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Container-Scanning.gitlab-ci.yml) can only be used once container_scanning job. Need a way to use this as a .container_scanning that can be extended to be used multiple times:

container_scanning-httpd:
  needs:
    - build httpd
  variables:
    CS_IMAGE: example.com/user/httpd:tag
  extends: .container-scanning
container_scanning-php:
  needs:
    - build php
  variables:
    CS_IMAGE: example.com/user/php:tag
  extends: .container-scanning