BigW Consortium Gitlab

Commit e26953bc by Katarzyna Kobierska

Build attributes with slice method

parent 52ebeb5a
......@@ -254,9 +254,6 @@ v 8.11.6
- Exclude some pending or inactivated rows in Member scopes.
- Add missing values to linter !6276 (Katarzyna Kobierska Ula Budziszewska)
v 8.11.6 (unreleased)
- Fix an error where we were unable to create a CommitStatus for running state
v 8.11.5
- Optimize branch lookups and force a repository reload for Repository#find_branch. !6087
- Fix member expiration date picker after update. !6184
......
......@@ -13,24 +13,19 @@ module Ci
private
def create_build(build_attributes)
build_attributes = {
stage_idx: build_attributes[:stage_idx],
stage: build_attributes[:stage],
commands: build_attributes[:commands],
tag_list: build_attributes[:tag_list],
name: build_attributes[:name],
when: build_attributes[:when],
allow_failure: build_attributes[:allow_failure],
environment: build_attributes[:environment],
yaml_variables: build_attributes[:yaml_variables],
options: build_attributes[:options],
build_attributes = build_attributes.slice(
:stage_idx, :stage, :commands, :tag_list, :name, :when, :allow_failure,
:environment, :yaml_variables, :options
)
build_attributes = build_attributes.merge(
pipeline: pipeline,
project: pipeline.project,
ref: pipeline.ref,
tag: pipeline.tag,
user: current_user,
trigger_request: trigger_request
}
)
pipeline.builds.create(build_attributes)
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment