From 22e089a2481cbc111cfcf3ad075573fdbda913de Mon Sep 17 00:00:00 2001 From: Avielle Wolfe <awolfe@gitlab.com> Date: Fri, 1 Dec 2023 12:00:48 +0000 Subject: [PATCH] Revert "Merge branch 'diffblue-ci-template' into 'master'" This reverts merge request !137047 --- ..._templates_total_unique_counts_monthly.yml | 1 - ..._p_ci_templates_diffblue_cover_monthly.yml | 24 ----- ...i_templates_total_unique_counts_weekly.yml | 1 - ...1_p_ci_templates_diffblue_cover_weekly.yml | 24 ----- .../ci/templates/Diffblue-Cover.gitlab-ci.yml | 88 ------------------- .../ci/templates/Diffblue_Cover_spec.rb | 26 ------ .../lib/gitlab/ci/templates/templates_spec.rb | 1 - 7 files changed, 165 deletions(-) delete mode 100644 config/metrics/counts_28d/20231116002424_p_ci_templates_diffblue_cover_monthly.yml delete mode 100644 config/metrics/counts_7d/20231116002421_p_ci_templates_diffblue_cover_weekly.yml delete mode 100644 lib/gitlab/ci/templates/Diffblue-Cover.gitlab-ci.yml delete mode 100644 spec/lib/gitlab/ci/templates/Diffblue_Cover_spec.rb diff --git a/config/metrics/counts_28d/20210216184559_ci_templates_total_unique_counts_monthly.yml b/config/metrics/counts_28d/20210216184559_ci_templates_total_unique_counts_monthly.yml index 35a727f09dc76..1847eaf86a76c 100755 --- a/config/metrics/counts_28d/20210216184559_ci_templates_total_unique_counts_monthly.yml +++ b/config/metrics/counts_28d/20210216184559_ci_templates_total_unique_counts_monthly.yml @@ -181,7 +181,6 @@ options: - p_ci_templates_terraform_module_base - p_ci_templates_terraform_module - p_ci_templates_pages_zola - - p_ci_templates_diffblue_cover distribution: - ce - ee diff --git a/config/metrics/counts_28d/20231116002424_p_ci_templates_diffblue_cover_monthly.yml b/config/metrics/counts_28d/20231116002424_p_ci_templates_diffblue_cover_monthly.yml deleted file mode 100644 index 521ae02f6c418..0000000000000 --- a/config/metrics/counts_28d/20231116002424_p_ci_templates_diffblue_cover_monthly.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -key_path: redis_hll_counters.ci_templates.p_ci_templates_diffblue_cover_monthly -description: Count of pipelines using the Diffblue Cover template -product_section: ci -product_stage: pipeline_authoring -product_group: pipeline_authoring -value_type: number -status: active -milestone: "16.7" -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137047 -time_frame: 28d -data_source: redis_hll -data_category: optional -instrumentation_class: RedisHLLMetric -distribution: -- ce -- ee -tier: -- free -- premium -- ultimate -options: - events: - - p_ci_templates_diffblue_cover diff --git a/config/metrics/counts_7d/20210216184557_ci_templates_total_unique_counts_weekly.yml b/config/metrics/counts_7d/20210216184557_ci_templates_total_unique_counts_weekly.yml index 61fa197656bd0..3925f242efced 100755 --- a/config/metrics/counts_7d/20210216184557_ci_templates_total_unique_counts_weekly.yml +++ b/config/metrics/counts_7d/20210216184557_ci_templates_total_unique_counts_weekly.yml @@ -182,7 +182,6 @@ options: - p_ci_templates_terraform_module_base - p_ci_templates_terraform_module - p_ci_templates_pages_zola - - p_ci_templates_diffblue_cover distribution: - ce - ee diff --git a/config/metrics/counts_7d/20231116002421_p_ci_templates_diffblue_cover_weekly.yml b/config/metrics/counts_7d/20231116002421_p_ci_templates_diffblue_cover_weekly.yml deleted file mode 100644 index b9586f213a55a..0000000000000 --- a/config/metrics/counts_7d/20231116002421_p_ci_templates_diffblue_cover_weekly.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -key_path: redis_hll_counters.ci_templates.p_ci_templates_diffblue_cover_weekly -description: Count of pipelines using the Diffblue Cover template -product_section: ci -product_stage: pipeline_authoring -product_group: pipeline_authoring -value_type: number -status: active -milestone: "16.7" -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137047 -time_frame: 7d -data_source: redis_hll -data_category: optional -instrumentation_class: RedisHLLMetric -distribution: -- ce -- ee -tier: -- free -- premium -- ultimate -options: - events: - - p_ci_templates_diffblue_cover diff --git a/lib/gitlab/ci/templates/Diffblue-Cover.gitlab-ci.yml b/lib/gitlab/ci/templates/Diffblue-Cover.gitlab-ci.yml deleted file mode 100644 index c8b3aa1d70531..0000000000000 --- a/lib/gitlab/ci/templates/Diffblue-Cover.gitlab-ci.yml +++ /dev/null @@ -1,88 +0,0 @@ -# This template is provided and maintained by Diffblue. -# You can copy and paste this template into a new `.gitlab-ci.yml` file. -# This template is designed to be used with the Cover Pipeline for GitLab integration from Diffblue. -# It will download the latest version of Diffblue Cover, build the associated project, and -# automatically write Java unit tests for the project. -# Note that additional config is required: -# https://docs.diffblue.com/features/cover-pipeline/cover-pipeline-for-gitlab -# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword. -# -# To contribute improvements to CI/CD templates, please follow the Development guide at: -# https://docs.gitlab.com/ee/development/cicd/templates.html -# This specific template is located at: -# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Diffblue-Cover.gitlab-ci.yml - -variables: - # Configure the following via the Diffblue Cover integration config for your project, or by - # using CI/CD masked Variables. - # For details, see https://docs.diffblue.com/features/cover-pipeline/cover-pipeline-for-gitlab - - # Diffblue Cover license key: DIFFBLUE_LICENSE_KEY - # Refer to your welcome email or you can obtain a free trial key from - # https://www.diffblue.com/try-cover/gitlab - - # GitLab access token: DIFFBLUE_ACCESS_TOKEN, DIFFBLUE_ACCESS_TOKEN_NAME - # The access token should have a role of Developer or better and should have - # api and write_repository permissions. - - # Diffblue Cover requires a minimum of 4GB of memory. - JVM_ARGS: -Xmx4g - -stages: - - build - -diffblue-cover: - stage: build - - # Select the Cover CLI docker image to use with your CI tool. - # Tag variations are produced for each supported JDK version. - # Go to https://hub.docker.com/r/diffblue/cover-cli for details. - # Note: To use the latest version of Diffblue Cover, use one of the latest-jdk<nn> tags. - # To use a specific release version, use one of the yyyy.mm.dd-jdk<nn> tags. - image: diffblue/cover-cli:latest-jdk17 - - # Diffblue Cover currently only supports running on merge_request_events. - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - # Diffblue Cover log files are saved to a .diffblue/ directory in the pipeline artifacts, - # and are available for download once the pipeline completes. - artifacts: - paths: - - "**/.diffblue/" - - script: - - # Diffblue Cover requires the project to be built before creating any tests. - # Either specify the build command here (one of the following), or provide - # prebuilt artifacts via a job dependency. - - # Maven project example (comment out the Gradle version if used): - - mvn test-compile --batch-mode --no-transfer-progress - - # Gradle project example (comment out the Maven version if used): - # - gradle testClasses - - # Diffblue Cover commands and options to run. - # dcover – the core Diffblue Cover command - # ci – enable the GitLab CI/CD integration via environment variables - # activate - activate the license key - # validate - remove non-compiling and failing tests - # create - create new tests for your project - # --maven – use the maven build tool - # For detailed information on Cover CLI commands and options, see - # https://docs.diffblue.com/features/cover-cli/commands-and-arguments - - dcover - ci - activate - validate --maven - create --maven - - # Diffblue Cover will also respond to specific project labels: - # Diffblue Cover: Baseline - # Used to mark a merge request as requiring a full suite of tests to be written. - # This overrides the default behaviour where Cover will only write tests related - # to the code changes already in the merge request. This is useful when running Diffblue - # Cover for the first time on a project and when new product enhancements are released. - # Diffblue Cover: Skip - # Used to mark a merge request as requiring no tests to be written. diff --git a/spec/lib/gitlab/ci/templates/Diffblue_Cover_spec.rb b/spec/lib/gitlab/ci/templates/Diffblue_Cover_spec.rb deleted file mode 100644 index c16356bfda752..0000000000000 --- a/spec/lib/gitlab/ci/templates/Diffblue_Cover_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'Diffblue-Cover.gitlab-ci.yml', feature_category: :continuous_integration do - subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('Diffblue-Cover') } - - describe 'the created pipeline' do - let(:pipeline_branch) { 'patch-1' } - let_it_be(:project) { create(:project, :repository, create_branch: 'patch-1') } - let(:user) { project.first_owner } - - let(:mr_service) { MergeRequests::CreatePipelineService.new(project: project, current_user: user) } - let(:merge_request) { create(:merge_request, :simple, source_project: project, source_branch: pipeline_branch) } - let(:mr_pipeline) { mr_service.execute(merge_request).payload } - let(:mr_build_names) { mr_pipeline.builds.pluck(:name) } - - before do - stub_ci_pipeline_yaml_file(template.content) - end - - it 'creates diffblue-cover jobs' do - expect(mr_build_names).to include('diffblue-cover') - end - end -end diff --git a/spec/lib/gitlab/ci/templates/templates_spec.rb b/spec/lib/gitlab/ci/templates/templates_spec.rb index 98f0d32960b3f..36c6e805bdf43 100644 --- a/spec/lib/gitlab/ci/templates/templates_spec.rb +++ b/spec/lib/gitlab/ci/templates/templates_spec.rb @@ -20,7 +20,6 @@ context 'that support autodevops' do exceptions = [ - 'Diffblue-Cover.gitlab-ci.yml', # no auto-devops 'Security/DAST.gitlab-ci.yml', # DAST stage is defined inside AutoDevops yml 'Security/DAST-API.gitlab-ci.yml', # no auto-devops 'Security/API-Fuzzing.gitlab-ci.yml', # no auto-devops -- GitLab