diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-24 06:10:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-24 06:10:40 +0300 |
commit | 095467eafbd243520828272de0926da3cbc71761 (patch) | |
tree | 19f6d7f16bbaf5c97bbd9aed4c1555d10df4d8ef /app/models/packages | |
parent | 47dc0510755f474fdd2369dfbbaaa019053b4492 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/packages')
-rw-r--r-- | app/models/packages/package.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/packages/package.rb b/app/models/packages/package.rb index dcc3970c49f..34eae6ab5dc 100644 --- a/app/models/packages/package.rb +++ b/app/models/packages/package.rb @@ -293,6 +293,13 @@ class Packages::Package < ApplicationRecord ::Packages::Maven::Metadata::SyncWorker.perform_async(user.id, project.id, name) end + def create_build_infos!(build) + return unless build&.pipeline + + # TODO: use an upsert call when https://gitlab.com/gitlab-org/gitlab/-/issues/339093 is implemented + build_infos.find_or_create_by!(pipeline: build.pipeline) + end + private def composer_tag_version? |