BigW Consortium Gitlab

Commit b6f41544 by Shinya Maeda

Fix spec. Add PipelineScheduleVariable for import_export

parent 23f3c733
......@@ -5,6 +5,6 @@ module Ci
belongs_to :pipeline_schedule
validates :key, uniqueness: { scope: :pipeline_schedule_id }
validates :key, uniqueness: { scope: :pipeline_schedule_id }, presence: { unless: :importing? }
end
end
......@@ -9,7 +9,7 @@ and a list of **user-defined variables**.
The variables can be overwritten and they take precedence over each other in
this order:
1. [Trigger variables][triggers] or [scheduled pipeline variables](../../user/project/pipelines/schedules#making-use-of-scheduled-pipeline-variables) (take precedence over all)
1. [Trigger variables][triggers] or [scheduled pipeline variables](../../user/project/pipelines/schedules.md#making-use-of-scheduled-pipeline-variables) (take precedence over all)
1. [Secret variables](#secret-variables) or [protected secret variables](#protected-secret-variables)
1. YAML-defined [job-level variables](../yaml/README.md#job-variables)
1. YAML-defined [global variables](../yaml/README.md#variables)
......
......@@ -42,7 +42,8 @@ project_tree:
- :stages
- :statuses
- :triggers
- :pipeline_schedules
- pipeline_schedules:
- :variables
- :services
- :hooks
- protected_branches:
......
......@@ -132,6 +132,9 @@ pipeline_schedules:
- last_pipeline
pipeline_schedule:
- pipelines
- pipeline_schedule_variables
pipeline_schedule_variables:
- pipeline_schedule
deploy_keys:
- user
- deploy_keys_projects
......
......@@ -1375,8 +1375,10 @@ describe Ci::Build, :models do
context 'when a job was triggered by a pipeline schedule' do
let(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project) }
let!(:pipeline_schedule_variable) do
create(:ci_pipeline_schedule_variable, key: 'SCHEDULE_VARIABLE_KEY',
create(:ci_pipeline_schedule_variable,
key: 'SCHEDULE_VARIABLE_KEY',
pipeline_schedule: pipeline_schedule)
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