Welcome to mirror list, hosted at ThFree Co, Russian Federation.

container_scanning_build_action.rb « ci_configuration « security « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f04c221fc40668b601115ffe3ff19ac928aae6b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# frozen_string_literal: true

module Security
  module CiConfiguration
    class ContainerScanningBuildAction < BaseBuildAction
      private

      def update_existing_content!
        @existing_gitlab_ci_content['include'] = generate_includes
      end

      def template
        return 'Auto-DevOps.gitlab-ci.yml' if @auto_devops_enabled

        'Jobs/Container-Scanning.gitlab-ci.yml'
      end

      def comment
        <<~YAML
          #{super}
          # container_scanning:
          #   variables:
          #     DOCKER_IMAGE: ...
          #     DOCKER_USER: ...
          #     DOCKER_PASSWORD: ...
        YAML
      end
    end
  end
end