diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml | 8 | ||||
-rw-r--r-- | lib/gitlab/ci/templates/Security/License-Scanning.gitlab-ci.yml | 33 | ||||
-rw-r--r-- | lib/gitlab/diff/formatters/image_formatter.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/file_hook.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/gpg/commit.rb | 2 |
5 files changed, 41 insertions, 8 deletions
diff --git a/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml b/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml index f10a445f7c9..58fd018a82d 100644 --- a/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml @@ -1,8 +1,5 @@ -# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/license_management/ -# -# Configure the scanning tool through the environment variables. -# List of the variables: https://gitlab.com/gitlab-org/security-products/license-management#settings -# How to set: https://docs.gitlab.com/ee/ci/yaml/#variables +# Deprecated: https://gitlab.com/gitlab-org/gitlab/issues/14624 +# Please, use License-Scanning.gitlab-ci.yml template instead variables: LICENSE_MANAGEMENT_SETUP_CMD: '' # If needed, specify a command to setup your environment with a custom package manager. @@ -16,6 +13,7 @@ license_management: SETUP_CMD: $LICENSE_MANAGEMENT_SETUP_CMD allow_failure: true script: + - echo "This template is deprecated, please use License-Scanning.gitlab-ci.yml template instead." - /run.sh analyze . artifacts: reports: diff --git a/lib/gitlab/ci/templates/Security/License-Scanning.gitlab-ci.yml b/lib/gitlab/ci/templates/Security/License-Scanning.gitlab-ci.yml new file mode 100644 index 00000000000..5c790f3e0ab --- /dev/null +++ b/lib/gitlab/ci/templates/Security/License-Scanning.gitlab-ci.yml @@ -0,0 +1,33 @@ +# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/license_compliance/ +# +# Configure the scanning tool through the environment variables. +# List of the variables: https://gitlab.com/gitlab-org/security-products/license-management#settings +# How to set: https://docs.gitlab.com/ee/ci/yaml/#variables + +variables: + LICENSE_MANAGEMENT_SETUP_CMD: '' # If needed, specify a command to setup your environment with a custom package manager. + +license_scanning: + stage: test + image: + name: "registry.gitlab.com/gitlab-org/security-products/license-management:$CI_SERVER_VERSION_MAJOR-$CI_SERVER_VERSION_MINOR-stable" + entrypoint: [""] + variables: + SETUP_CMD: $LICENSE_MANAGEMENT_SETUP_CMD + allow_failure: true + script: + - /run.sh analyze . + after_script: + - mv gl-license-management-report.json gl-license-scanning-report.json + artifacts: + reports: + license_scanning: gl-license-scanning-report.json + dependencies: [] + only: + refs: + - branches + variables: + - $GITLAB_FEATURES =~ /\blicense_management\b/ + except: + variables: + - $LICENSE_MANAGEMENT_DISABLED diff --git a/lib/gitlab/diff/formatters/image_formatter.rb b/lib/gitlab/diff/formatters/image_formatter.rb index 5bc9f0c337f..90cd74c84bb 100644 --- a/lib/gitlab/diff/formatters/image_formatter.rb +++ b/lib/gitlab/diff/formatters/image_formatter.rb @@ -37,7 +37,9 @@ module Gitlab def ==(other) other.is_a?(self.class) && x == other.x && - y == other.y + y == other.y && + width == other.width && + height == other.height end end end diff --git a/lib/gitlab/file_hook.rb b/lib/gitlab/file_hook.rb index f886fd10f53..38c19ff506f 100644 --- a/lib/gitlab/file_hook.rb +++ b/lib/gitlab/file_hook.rb @@ -17,7 +17,7 @@ module Gitlab def self.execute_all_async(data) args = files.map { |file| [file, data] } - FileHookWorker.bulk_perform_async(args) + FileHookWorker.bulk_perform_async(args) # rubocop:disable Scalability/BulkPerformWithContext end def self.execute(file, data) diff --git a/lib/gitlab/gpg/commit.rb b/lib/gitlab/gpg/commit.rb index 48b327a54e1..800e94e51e8 100644 --- a/lib/gitlab/gpg/commit.rb +++ b/lib/gitlab/gpg/commit.rb @@ -8,7 +8,7 @@ module Gitlab def initialize(commit) @commit = commit - repo = commit.project.repository.raw_repository + repo = commit.container.repository.raw_repository @signature_data = Gitlab::Git::Commit.extract_signature_lazily(repo, commit.sha || commit.id) lazy_signature |