Failure in ee/spec/lib/ee/gitlab/ci/templates/templates_spec.rb | CI YML Templates that support autodevops template_name: Diffblue-Cover.gitlab-ci.yml are valid with default stages
Test metadata (don't modify)
Field | Value |
---|---|
File URL | ee/spec/lib/ee/gitlab/ci/templates/templates_spec.rb#L41 |
Filename | ee/spec/lib/ee/gitlab/ci/templates/templates_spec.rb |
Description | CI YML Templates that support autodevops template_name: "Diffblue-Cover.gitlab-ci.yml" are valid with default stages |
Test level | unit |
Hash | 4efb51c4660f5e482333ffc45d78e6376e61bb565 |
Duration | 0.1 seconds |
Expected duration | < 27.12 seconds |
Stack trace
Failure/Error: expect(subject).to be_valid
expected #<Gitlab::Ci::YamlProcessor::Result:0x00007af3588ad768 @ci_config=#<Gitlab::Ci::Config:0x00007af355d63968 @logger=#<Gitlab::Ci::Pipeline::Logger:0x00007af355d638f0 @started_at=3974.874275428, @project=nil, @destination=Gitlab::AppJsonLogger, @log_conditions=[], @enabled?=true, @observations={"config_build_variables_duration_s"=>7.763999974486069e-05, "config_build_context_duration_s"=>0.0005180100001780374, "config_yaml_load_duration_s"=>0.0003938089998882788, "config_mapper_normalizer_duration_s"=>[8.410000191361178e-06], "config_mapper_filter_duration_s"=>[1.1829999948531622e-05], "config_mapper_locationexpander_duration_s"=>[4.539999736152822e-06], "config_mapper_variablesexpander_duration_s"=>[1.9550000160961645e-05], "config_mapper_matcher_duration_s"=>[5.599999985861359e-05], "config_file_fetch_template_content_duration_s"=>[0.0002137199999197037], "config_file_fetch_content_hash_duration_s"=>[0.0003202699999746983], "config_file_expand_content_includes_duration_s"=>[4.669999998441199e-05], "config_mapper_verifier_duration_s"=>[0.0006811200000811368], "config_mapper_process_duration_s"=>[0.0009104000000661472], "config_external_merge_duration_s"=>[5.789999704575166e-06], "config_external_process_duration_s"=>0.0009419099997103331, "config_yaml_extend_duration_s"=>5.903999999645748e-05, "config_tags_resolve_duration_s"=>0.0001032100003612868, "config_stages_inject_duration_s"=>4.9899999794433825e-05, "config_expand_duration_s"=>0.00537317999987863, "config_root_duration_s"=>0.00012293999998291838, "config_root_compose_jobs_factory_duration_s"=>8.35999981063651e-06, "config_root_compose_jobs_create_duration_s"=>5.770999996457249e-05, "config_root_compose_duration_s"=>0.0049901600000339386}>, @source_ref_path=nil, @project=nil, @inject_edge_stages=true, @context=#<Gitlab::Ci::Config::External::Context:0x00007af355d5b650 @project=nil, @pipeline=#<Ci::Pipeline id: nil, ref: nil, sha: nil, before_sha: nil, created_at: nil, updated_at: nil, tag: false, yaml_errors: nil, committed_at: nil, project_id: nil, status: "created", started_at: nil, finished_at: nil, duration: nil, user_id: nil, lock_version: 0, pipeline_schedule_id: nil, source: "unknown", config_source: "unknown_source", protected: nil, failure_reason: nil, iid: nil, merge_request_id: nil, source_sha: nil, target_sha: nil, external_pull_request_id: nil, ci_ref_id: nil, locked: "artifacts_locked", partition_id: nil, auto_canceled_by_id: nil>, @sha=nil, @user=nil, @parent_pipeline=nil, @variables=#<Gitlab::Ci::Variables::Collection:0x00007af355d5b8a8 @variables=[], @variables_by_key={}, @errors=nil>, @pipeline_config=nil, @expandset=[#<Gitlab::Ci::Config::External::File::Template:0x00007af3583b2128 @location="Diffblue-Cover.gitlab-ci.yml", @params={:template=>"Diffblue-Cover.gitlab-ci.yml"}, @context=#<Gitlab::Ci::Config::External::Context:0x00007af355d5b650 ...>, @errors=[], @content="# This file is a template, and might need editing before it works on your project.\n# This template is provided and maintained by Diffblue.\n# You can copy and paste this template into a new `.gitlab-ci.yml` file.\n# This template is designed to be used with the Cover Pipeline for GitLab integration from Diffblue.\n# It will download the latest version of Diffblue Cover, build the associated project, and\n# automatically write Java unit tests for the project.\n# Note that additional config is required:\n# https://docs.diffblue.com/features/cover-pipeline/cover-pipeline-for-gitlab\n# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.\n#\n# To contribute improvements to CI/CD templates, please follow the Development guide at:\n# https://docs.gitlab.com/ee/development/cicd/templates.html\n# This specific template is located at:\n# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Diffblue-Cover.gitlab-ci.yml\n\nvariables:\n # Configure the following via the Diffblue Cover integration config for your project, or by\n # using CI/CD masked Variables.\n # For details, see https://docs.diffblue.com/features/cover-pipeline/cover-pipeline-for-gitlab\n\n # Diffblue Cover license key: DIFFBLUE_LICENSE_KEY\n # Refer to your welcome email or you can obtain a free trial key from\n # https://www.diffblue.com/try-cover/gitlab\n\n # GitLab access token: DIFFBLUE_ACCESS_TOKEN, DIFFBLUE_ACCESS_TOKEN_NAME\n # The access token should have a role of Developer or better and should have\n # api and write_repository permissions.\n\n # Diffblue Cover requires a minimum of 4GB of memory.\n JVM_ARGS: -Xmx4g\n\nstages:\n - build\n\ndiffblue-cover:\n stage: build\n\n # Select the Cover CLI docker image to use with your CI tool.\n # Tag variations are produced for each supported JDK version.\n # Go to https://hub.docker.com/r/diffblue/cover-cli for details.\n # Note: To use the latest version of Diffblue Cover, use one of the latest-jdk<nn> tags.\n # To use a specific release version, use one of the yyyy.mm.dd-jdk<nn> tags.\n image: diffblue/cover-cli:latest-jdk17\n\n # Diffblue Cover currently only supports running on merge_request_events.\n rules:\n - if: $CI_PIPELINE_SOURCE == 'merge_request_event'\n\n # Diffblue Cover log files are saved to a .diffblue/ directory in the pipeline artifacts,\n # and are available for download once the pipeline completes.\n artifacts:\n paths:\n - \"**/.diffblue/\"\n\n script:\n\n # Diffblue Cover requires the project to be built before creating any tests.\n # Either specify the build command here (one of the following), or provide\n # prebuilt artifacts via a job dependency.\n\n # Maven project example (comment out the Gradle version if used):\n - mvn test-compile --batch-mode --no-transfer-progress\n\n # Gradle project example (comment out the Maven version if used):\n # - gradle testClasses\n\n # Diffblue Cover commands and options to run.\n # dcover – the core Diffblue Cover command\n # ci – enable the GitLab CI/CD integration via environment variables\n # activate - activate the license key\n # validate - remove non-compiling and failing tests\n # create - create new tests for your project\n # --maven – use the maven build tool\n # For detailed information on Cover CLI commands and options, see\n # https://docs.diffblue.com/features/cover-cli/commands-and-arguments\n - dcover\n ci\n activate\n validate --maven\n create --maven\n\n # Diffblue Cover will also respond to specific project labels:\n # Diffblue Cover: Baseline\n # Used to mark a merge request as requiring a full suite of tests to be written.\n # This overrides the default behaviour where Cover will only write tests related\n # to the code changes already in the merge request. This is useful when running Diffblue\n # Cover for the first time on a project and when new product enhancements are released.\n # Diffblue Cover: Skip\n # Used to mark a merge request as requiring no tests to be written.\n", @content_result=#<Gitlab::Ci::Config::Yaml::Result:0x00007af35839c418 @config=[{:variables=>{:JVM_ARGS=>"-Xmx4g"}, :stages=>["build"], :"diffblue-cover"=>{:stage=>"build", :image=>"diffblue/cover-cli:latest-jdk17", :rules=>[{:if=>"$CI_PIPELINE_SOURCE == 'merge_request_event'"}], :artifacts=>{:paths=>["**/.diffblue/"]}, :script=>["mvn test-compile --batch-mode --no-transfer-progress", "dcover ci activate validate --maven create --maven"]}}], @error=nil, @error_class=nil, @interpolated=false>, @expanded_content_hash={:variables=>{:JVM_ARGS=>"-Xmx4g"}, :stages=>["build"], :"diffblue-cover"=>{:stage=>"build", :image=>"diffblue/cover-cli:latest-jdk17", :rules=>[{:if=>"$CI_PIPELINE_SOURCE == 'merge_request_event'"}], :artifacts=>{:paths=>["**/.diffblue/"]}, :script=>["mvn test-compile --batch-mode --no-transfer-progress", "dcover ci activate validate --maven create --maven"]}}>], @execution_deadline=4004.875080718, @logger=#<Gitlab::Ci::Pipeline::Logger:0x00007af355d638f0 @started_at=3974.874275428, @project=nil, @destination=Gitlab::AppJsonLogger, @log_conditions=[], @enabled?=true, @observations={"config_build_variables_duration_s"=>7.763999974486069e-05, "config_build_context_duration_s"=>0.0005180100001780374, "config_yaml_load_duration_s"=>0.0003938089998882788, "config_mapper_normalizer_duration_s"=>[8.410000191361178e-06], "config_mapper_filter_duration_s"=>[1.1829999948531622e-05], "config_mapper_locationexpander_duration_s"=>[4.539999736152822e-06], "config_mapper_variablesexpander_duration_s"=>[1.9550000160961645e-05], "config_mapper_matcher_duration_s"=>[5.599999985861359e-05], "config_file_fetch_template_content_duration_s"=>[0.0002137199999197037], "config_file_fetch_content_hash_duration_s"=>[0.0003202699999746983], "config_file_expand_content_includes_duration_s"=>[4.669999998441199e-05], "config_mapper_verifier_duration_s"=>[0.0006811200000811368], "config_mapper_process_duration_s"=>[0.0009104000000661472], "config_external_merge_duration_s"=>[5.789999704575166e-06], "config_external_process_duration_s"=>0.0009419099997103331, "config_yaml_extend_duration_s"=>5.903999999645748e-05, "config_tags_resolve_duration_s"=>0.0001032100003612868, "config_stages_inject_duration_s"=>4.9899999794433825e-05, "config_expand_duration_s"=>0.00537317999987863, "config_root_duration_s"=>0.00012293999998291838, "config_root_compose_jobs_factory_duration_s"=>8.35999981063651e-06, "config_root_compose_jobs_create_duration_s"=>5.770999996457249e-05, "config_root_compose_duration_s"=>0.0049901600000339386}>, @max_includes=150, @max_total_yaml_size_bytes=157286400, @total_file_size_in_bytes=40>, @source=nil, @config={:variables=>{:JVM_ARGS=>"-Xmx4g"}, :stages=>[".pre", "build", ".post"], :"diffblue-cover"=>{:stage=>"build", :image=>"diffblue/cover-cli:latest-jdk17", :rules=>[{:if=>"$CI_PIPELINE_SOURCE == 'merge_request_event'"}], :artifacts=>{:paths=>["**/.diffblue/"]}, :script=>["mvn test-compile --batch-mode --no-transfer-progress", "dcover ci activate validate --maven create --maven"]}, :concrete_build_implemented_by_a_user=>{:stage=>"test", :script=>"do something"}}, @root=#<Gitlab::Ci::Config::Entry::Root {: [#<Gitlab::Ci::Config::Entry::Default {default: [#<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>]}>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Ci::Config::Entry::Variables {variables: [#<Gitlab::Ci::Config::Entry::Variable::SimpleVariable {JVM_ARGS: "-Xmx4g"}>]}>, #<Gitlab::Ci::Config::Entry::Stages {stages: [".pre", "build", ".post"]}>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Ci::Config::Entry::Workflow {workflow: [#<Gitlab::Config::Entry::Undefined>]}>, #<Gitlab::Ci::Config::Entry::Jobs {jobs: [#<Gitlab::Ci::Config::Entry::Job {diffblue-cover: [#<Gitlab::Ci::Config::Entry::Stage {stage: "build"}>, #<Gitlab::Ci::Config::Entry::Rules {rules: [#<Gitlab::Ci::Config::Entry::Rules::Rule {rule: [#<Gitlab::Config::Entry::Undefined>, #<Gitlab::Ci::Config::Entry::Variables {variables: {}}>, #<Gitlab::Config::Entry::Undefined>]}>]}>, #<Gitlab::Ci::Config::Entry::Variables {variables: {}}>, #<Gitlab::Ci::Config::Entry::Inherit {inherit: [#<Gitlab::Ci::Config::Entry::Inherit::Default::BooleanStrategy {default: true}>, #<Gitlab::Ci::Config::Entry::Inherit::Variables::BooleanStrategy {variables: true}>]}>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Ci::Config::Entry::Commands {script: ["mvn test-compile --batch-mode --no-transfer-progress", "dcover ci activate validate --maven create --maven"]}>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Ci::Config::Entry::Image {image: "diffblue/cover-cli:latest-jdk17"}>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Ci::Config::Entry::Artifacts {artifacts: [#<Gitlab::Config::Entry::Undefined>]}>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Ci::Config::Entry::Publish {publish: "public"}>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>]}>, #<Gitlab::Ci::Config::Entry::Job {concrete_build_implemented_by_a_user: [#<Gitlab::Ci::Config::Entry::Stage {stage: "test"}>, #<Gitlab::Ci::Config::Entry::Policy::ComplexPolicy {only: {:refs=>["branches", "tags"]}}>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Ci::Config::Entry::Variables {variables: {}}>, #<Gitlab::Ci::Config::Entry::Inherit {inherit: [#<Gitlab::Ci::Config::Entry::Inherit::Default::BooleanStrategy {default: true}>, #<Gitlab::Ci::Config::Entry::Inherit::Variables::BooleanStrategy {variables: true}>]}>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Ci::Config::Entry::Commands {script: "do something"}>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Ci::Config::Entry::Publish {publish: "public"}>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>, #<Gitlab::Config::Entry::Undefined>]}>]}>]}>, @normalized_jobs={:"diffblue-cover"=>{:name=>:"diffblue-cover", :stage=>"build", :rules=>[{:if=>"$CI_PIPELINE_SOURCE == 'merge_request_event'"}], :job_variables=>{}, :root_variables_inheritance=>true, :script=>["mvn test-compile --batch-mode --no-transfer-progress", "dcover ci activate validate --maven create --maven"], :image=>{:name=>"diffblue/cover-cli:latest-jdk17"}, :artifacts=>{:paths=>["**/.diffblue/"]}, :ignore=>false, :scheduling_type=>:stage}, :concrete_build_implemented_by_a_user=>{:name=>:concrete_build_implemented_by_a_user, :stage=>"test", :job_variables=>{}, :root_variables_inheritance=>true, :only=>{:refs=>["branches", "tags"]}, :script=>["do something"], :ignore=>false, :scheduling_type=>:stage}}>, @errors=["concrete_build_implemented_by_a_user job: chosen stage does not exist; available stages are .pre, build, .post"], @warnings=[]> to be valid, but got errors: concrete_build_implemented_by_a_user job: chosen stage does not exist; available stages are .pre, build, .post
Reports (8)
- 2023-12-01: https://gitlab.com/gitlab-org/gitlab/-/jobs/5661078604 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1092132905)
- 2023-12-01: https://gitlab.com/gitlab-org/gitlab/-/jobs/5661277685 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1092164874)
- 2023-12-01: https://gitlab.com/gitlab-org/gitlab/-/jobs/5661587174 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1092214245)
- 2023-12-01: https://gitlab.com/gitlab-org/gitlab/-/jobs/5661734010 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1092163698)
- 2023-12-01: https://gitlab.com/gitlab-org/gitlab/-/jobs/5661575777 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1092212719)
- 2023-12-01: https://gitlab.com/gitlab-org/gitlab/-/jobs/5661760338 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1092164874)
- 2023-12-06: https://gitlab.com/gitlab-org/gitlab/-/jobs/5689191785 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1092212719)
- 2023-12-06: https://gitlab.com/gitlab-org/gitlab/-/jobs/5689549897 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/1092212719)
Edited by Ghost User