diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-16 15:07:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-16 15:07:51 +0300 |
commit | 1c9afffa29584c92bf1bb73c005f69c6875808e6 (patch) | |
tree | 39332df6f417a28296703e28bd7f5c9ab08275d6 /qa | |
parent | f15ffb0170776275ff875ddc32bcd79d6c6163eb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
3 files changed, 36 insertions, 7 deletions
diff --git a/qa/qa/page/project/pipeline/show.rb b/qa/qa/page/project/pipeline/show.rb index f499b748fb4..3f1cc2f1257 100644 --- a/qa/qa/page/project/pipeline/show.rb +++ b/qa/qa/page/project/pipeline/show.rb @@ -74,7 +74,11 @@ module QA end def has_linked_pipeline?(title: nil) - title ? find_linked_pipeline_by_title(title) : has_element?(:linked_pipeline_container) + # If the pipeline page has loaded linked pipelines should appear, but it can take a little while, + # especially on busier environments. + retry_until(reload: true, message: 'Waiting for linked pipeline to appear') do + title ? find_linked_pipeline_by_title(title) : has_element?(:linked_pipeline_container) + end end alias_method :has_child_pipeline?, :has_linked_pipeline? diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/multi-project_pipelines_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/multi-project_pipelines_spec.rb index 0d8756fc9a3..c5408f30d16 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/multi-project_pipelines_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/multi-project_pipelines_spec.rb @@ -44,7 +44,7 @@ module QA end it( - 'creates a multi-project pipeline', + 'creates a multi-project pipeline with artifact download', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/358064' ) do Page::Project::Pipeline::Show.perform do |show| @@ -78,7 +78,10 @@ module QA job1: stage: test tags: ["#{executor}"] - script: echo 'done' + script: echo 'done' > output.txt + artifacts: + paths: + - output.txt staging: stage: deploy @@ -96,7 +99,12 @@ module QA "#{downstream_job_name}": stage: test tags: ["#{executor}"] - script: echo 'done' + needs: + - project: #{upstream_project.path_with_namespace} + job: job1 + ref: main + artifacts: true + script: cat output.txt YAML } end diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/parent_child_pipelines_dependent_relationship_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/parent_child_pipelines_dependent_relationship_spec.rb index 5b7a569fa8a..f2278c7bf6d 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/parent_child_pipelines_dependent_relationship_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/parent_child_pipelines_dependent_relationship_spec.rb @@ -60,7 +60,14 @@ module QA child_job: stage: test tags: ["#{project.name}"] - script: echo "Child job done!" + needs: + - project: #{project.path_with_namespace} + job: job1 + ref: main + artifacts: true + script: + - cat output.txt + - echo "Child job done!" YAML } @@ -84,18 +91,28 @@ module QA file_path: '.gitlab-ci.yml', content: <<~YAML stages: + - build - test - deploy + default: + tags: ["#{project.name}"] + job1: + stage: build + script: echo "build success" > output.txt + artifacts: + paths: + - output.txt + + job2: stage: test trigger: include: ".child-ci.yml" strategy: depend - job2: + job3: stage: deploy - tags: ["#{project.name}"] script: echo "parent deploy done" YAML |