diff options
Diffstat (limited to 'app/services/packages/maven')
-rw-r--r-- | app/services/packages/maven/create_package_service.rb | 7 | ||||
-rw-r--r-- | app/services/packages/maven/find_or_create_package_service.rb | 5 |
2 files changed, 4 insertions, 8 deletions
diff --git a/app/services/packages/maven/create_package_service.rb b/app/services/packages/maven/create_package_service.rb index 3df17021499..540c7b1d4da 100644 --- a/app/services/packages/maven/create_package_service.rb +++ b/app/services/packages/maven/create_package_service.rb @@ -6,7 +6,7 @@ module Packages app_group, _, app_name = params[:name].rpartition('/') app_group.tr!('/', '.') - package = create_package!(:maven, + create_package!(:maven, maven_metadatum_attributes: { path: params[:path], app_group: app_group, @@ -14,11 +14,6 @@ module Packages app_version: params[:version] } ) - - build = params[:build] - package.create_build_info!(pipeline: build.pipeline) if build.present? - - package end end end diff --git a/app/services/packages/maven/find_or_create_package_service.rb b/app/services/packages/maven/find_or_create_package_service.rb index 505f45a7b21..a2a61ff8d93 100644 --- a/app/services/packages/maven/find_or_create_package_service.rb +++ b/app/services/packages/maven/find_or_create_package_service.rb @@ -38,8 +38,7 @@ module Packages package_params = { name: package_name, path: params[:path], - version: version, - build: params[:build] + version: version } package = @@ -47,6 +46,8 @@ module Packages .execute end + package.build_infos.create!(pipeline: params[:build].pipeline) if params[:build].present? + package end end |