blob: a5ebd4004d22d103eb101036f9e7df746a85ae45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# frozen_string_literal: true
module QA
RSpec.describe 'Verify', :runner, product_group: :pipeline_authoring do
describe 'UI defined variable' do
include_context 'variable inheritance test prep'
before do
add_ci_file(downstream1_project, [downstream1_ci_file])
add_ci_file(upstream_project, [upstream_ci_file, upstream_child1_ci_file])
start_pipeline_with_variable
wait_for_pipelines
end
it(
'is inheritable when forward:pipeline_variables is true',
:aggregate_failures,
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/358197'
) do
visit_job_page('child1', 'child1_job')
verify_job_log_shows_variable_value
page.go_back
visit_job_page('downstream1', 'downstream1_job')
verify_job_log_shows_variable_value
end
def upstream_ci_file
{
file_path: '.gitlab-ci.yml',
content: <<~YAML
child1_trigger:
trigger:
include: .child1-ci.yml
forward:
pipeline_variables: true
downstream1_trigger:
trigger:
project: #{downstream1_project.full_path}
forward:
pipeline_variables: true
YAML
}
end
end
end
end
|