Commit f509f166 authored by Krasimir Angelov's avatar Krasimir Angelov

Merge branch 'jc-persist-runner-features' into 'master'

Add runner_features column to ci_builds_metadata

See merge request gitlab-org/gitlab!70189
parents dbf27167 319d5994
......@@ -20,6 +20,7 @@ module Ci
delegate :interruptible, to: :metadata, prefix: false, allow_nil: true
delegate :has_exposed_artifacts?, to: :metadata, prefix: false, allow_nil: true
delegate :environment_auto_stop_in, to: :metadata, prefix: false, allow_nil: true
delegate :runner_features, to: :metadata, prefix: false, allow_nil: false
before_create :ensure_metadata
end
......
# frozen_string_literal: true
class AddRunnerFeaturesToCiBuildsMetadata < Gitlab::Database::Migration[1.0]
enable_lock_retries!
def change
add_column :ci_builds_metadata, :runner_features, :jsonb, default: {}, null: false
end
end
76bfbf3f12fed895c3cfb891080b5a452d1204c83ce96736048f857b33458ad1
\ No newline at end of file
......@@ -11410,7 +11410,8 @@ CREATE TABLE ci_builds_metadata (
expanded_environment_name character varying(255),
secrets jsonb DEFAULT '{}'::jsonb NOT NULL,
build_id bigint NOT NULL,
id bigint NOT NULL
id bigint NOT NULL,
runner_features jsonb DEFAULT '{}'::jsonb NOT NULL
);
CREATE SEQUENCE ci_builds_metadata_id_seq
......@@ -17,6 +17,8 @@ RSpec.describe Ci::Bridge do
{ trigger: { project: 'my/project', branch: 'master' } }
end
it { is_expected.to respond_to(:runner_features) }
it 'has many sourced pipelines' do
expect(bridge).to have_many(:sourced_pipelines)
end
......
......@@ -34,6 +34,7 @@ RSpec.describe Ci::Build do
it { is_expected.to respond_to(:has_trace?) }
it { is_expected.to respond_to(:trace) }
it { is_expected.to respond_to(:runner_features) }
it { is_expected.to delegate_method(:merge_request?).to(:pipeline) }
it { is_expected.to delegate_method(:merge_request_ref?).to(:pipeline) }
......
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