summaryrefslogtreecommitdiff
path: root/doc/ci/testing
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ci/testing')
-rw-r--r--doc/ci/testing/accessibility_testing.md2
-rw-r--r--doc/ci/testing/browser_performance_testing.md2
-rw-r--r--doc/ci/testing/code_quality.md48
-rw-r--r--doc/ci/testing/fail_fast_testing.md2
-rw-r--r--doc/ci/testing/index.md2
-rw-r--r--doc/ci/testing/load_performance_testing.md2
-rw-r--r--doc/ci/testing/metrics_reports.md2
-rw-r--r--doc/ci/testing/test_coverage_visualization.md2
-rw-r--r--doc/ci/testing/unit_test_report_examples.md9
-rw-r--r--doc/ci/testing/unit_test_reports.md2
10 files changed, 59 insertions, 14 deletions
diff --git a/doc/ci/testing/accessibility_testing.md b/doc/ci/testing/accessibility_testing.md
index 7940b27acf7..fa57371a7d5 100644
--- a/doc/ci/testing/accessibility_testing.md
+++ b/doc/ci/testing/accessibility_testing.md
@@ -1,7 +1,7 @@
---
stage: Verify
group: Pipeline Insights
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Accessibility testing **(FREE)**
diff --git a/doc/ci/testing/browser_performance_testing.md b/doc/ci/testing/browser_performance_testing.md
index 260ecf6108d..ff013f0037e 100644
--- a/doc/ci/testing/browser_performance_testing.md
+++ b/doc/ci/testing/browser_performance_testing.md
@@ -1,7 +1,7 @@
---
stage: Verify
group: Pipeline Insights
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Browser Performance Testing **(PREMIUM)**
diff --git a/doc/ci/testing/code_quality.md b/doc/ci/testing/code_quality.md
index 401279b9601..7345c7ca5eb 100644
--- a/doc/ci/testing/code_quality.md
+++ b/doc/ci/testing/code_quality.md
@@ -1,7 +1,7 @@
---
stage: Secure
group: Static Analysis
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Code Quality **(FREE)**
@@ -313,7 +313,7 @@ the nested architecture of container execution, the registry prefix must
be specifically configured to be passed down into CodeClimate's subsequent
`docker pull` commands for individual engines.
-The following two variables can address all of the required image pulls:
+The following variables can address all of the required image pulls:
- `CODE_QUALITY_IMAGE`: A fully prefixed image name that can be located anywhere
accessible from your job environment. GitLab Container Registry can be used here
@@ -322,6 +322,8 @@ The following two variables can address all of the required image pulls:
is a configuration option supported by [CodeClimate CLI](https://github.com/codeclimate/codeclimate/pull/948). You must:
- Include a trailing slash (`/`).
- Not include a protocol prefix, such as `https://`.
+- `CODECLIMATE_REGISTRY_USERNAME`: An optional variable to specify the username for the registry domain parsed from `CODECLIMATE_PREFIX`.
+- `CODECLIMATE_REGISTRY_PASSWORD`: An optional variable to specify the password for the registry domain parsed from `CODECLIMATE_PREFIX`.
```yaml
include:
@@ -333,13 +335,49 @@ code_quality:
CODECLIMATE_PREFIX: "my-private-registry.local:12345/"
```
-The images in the private container image registry must be available without authentication.
-Follow [this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/355814) for more information.
-
This example is specific to GitLab Code Quality. For more general
instructions on how to configure DinD with a registry mirror, see the
relevant [documentation](../docker/using_docker_build.md#enable-registry-mirror-for-dockerdind-service).
+#### Configure Code Quality to use the Dependency Proxy
+
+Prerequisite:
+
+- The project must be in a group where the [Dependency Proxy](../../user/packages/dependency_proxy/index.md) is enabled.
+
+Here is an example of how to configure Code Quality to use the Dependency Proxy:
+
+```yaml
+include:
+ - template: Jobs/Code-Quality.gitlab-ci.yml
+
+code_quality:
+ variables:
+ CODE_QUALITY_IMAGE: "$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/codequality:0.85.24"
+ ## You must add a trailing slash to `$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX`.
+ CODECLIMATE_PREFIX: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/
+ CODECLIMATE_REGISTRY_USERNAME: $CI_DEPENDENCY_PROXY_USER
+ CODECLIMATE_REGISTRY_PASSWORD: $CI_DEPENDENCY_PROXY_PASSWORD
+```
+
+#### Configure Code Quality to use Dockerhub with authentication
+
+Here is an example of how to configure Code Quality to use Dockerhub with authentication:
+
+```yaml
+include:
+ - template: Jobs/Code-Quality.gitlab-ci.yml
+
+code_quality:
+ variables:
+ CODECLIMATE_PREFIX: "registry-1.docker.io/"
+ CODECLIMATE_REGISTRY_USERNAME: $DOCKERHUB_USERNAME
+ CODECLIMATE_REGISTRY_PASSWORD: $DOCKERHUB_PASSWORD
+```
+
+You should add the username and password as [protected CI/CD variables](../variables/index.md#add-a-cicd-variable-to-a-project)
+in the project.
+
## Configuring jobs using variables
The Code Quality job supports environment variables that users can set to
diff --git a/doc/ci/testing/fail_fast_testing.md b/doc/ci/testing/fail_fast_testing.md
index 7b95b1ac54a..58471a626da 100644
--- a/doc/ci/testing/fail_fast_testing.md
+++ b/doc/ci/testing/fail_fast_testing.md
@@ -1,7 +1,7 @@
---
stage: Verify
group: Pipeline Insights
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Fail Fast Testing **(PREMIUM)**
diff --git a/doc/ci/testing/index.md b/doc/ci/testing/index.md
index a8f06ec695c..41d474f0e60 100644
--- a/doc/ci/testing/index.md
+++ b/doc/ci/testing/index.md
@@ -1,7 +1,7 @@
---
stage: Verify
group: Pipeline Insights
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Test with GitLab CI/CD and generate reports in merge requests **(FREE)**
diff --git a/doc/ci/testing/load_performance_testing.md b/doc/ci/testing/load_performance_testing.md
index e15b3944c2b..6e1b440f252 100644
--- a/doc/ci/testing/load_performance_testing.md
+++ b/doc/ci/testing/load_performance_testing.md
@@ -1,7 +1,7 @@
---
stage: Verify
group: Pipeline Insights
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Load Performance Testing **(PREMIUM)**
diff --git a/doc/ci/testing/metrics_reports.md b/doc/ci/testing/metrics_reports.md
index e855074ddea..e084e4d3bc7 100644
--- a/doc/ci/testing/metrics_reports.md
+++ b/doc/ci/testing/metrics_reports.md
@@ -1,7 +1,7 @@
---
stage: Verify
group: Pipeline Insights
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Metrics Reports **(PREMIUM)**
diff --git a/doc/ci/testing/test_coverage_visualization.md b/doc/ci/testing/test_coverage_visualization.md
index 472cfca99be..ee6b47e69a5 100644
--- a/doc/ci/testing/test_coverage_visualization.md
+++ b/doc/ci/testing/test_coverage_visualization.md
@@ -1,7 +1,7 @@
---
stage: Verify
group: Pipeline Insights
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Test coverage visualization **(FREE)**
diff --git a/doc/ci/testing/unit_test_report_examples.md b/doc/ci/testing/unit_test_report_examples.md
index b49ac29be65..c14e4eedd7c 100644
--- a/doc/ci/testing/unit_test_report_examples.md
+++ b/doc/ci/testing/unit_test_report_examples.md
@@ -1,7 +1,7 @@
---
stage: Verify
group: Pipeline Insights
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Unit test report examples **(FREE)**
@@ -183,7 +183,11 @@ the `javascript` job uses Jest to generate the test reports:
```yaml
javascript:
+ image: node:latest
stage: test
+ before_script:
+ - 'yarn global add jest'
+ - 'yarn add --dev jest-junit'
script:
- 'jest --ci --reporters=default --reporters=jest-junit'
artifacts:
@@ -193,6 +197,9 @@ javascript:
- junit.xml
```
+To make the job pass when there are no `.test.js` files with unit tests, add the
+`--passWithNoTests` flag to the end of the `jest` command in the `script:` section.
+
### Karma
The [Karma-junit-reporter](https://github.com/karma-runner/karma-junit-reporter)
diff --git a/doc/ci/testing/unit_test_reports.md b/doc/ci/testing/unit_test_reports.md
index 28356a62c99..0fe9b2b6d64 100644
--- a/doc/ci/testing/unit_test_reports.md
+++ b/doc/ci/testing/unit_test_reports.md
@@ -1,7 +1,7 @@
---
stage: Verify
group: Pipeline Insights
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Unit test reports **(FREE)**