diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-01 09:09:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-01 09:09:35 +0300 |
commit | b7ff336e241d1ece19498218f670041b16f62b1c (patch) | |
tree | 0693462d2f7fa28b5a6fa3b994291257fb000946 /doc | |
parent | f5823d9c245c6186ac27265af22927bda40f33f7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ci/merge_request_pipelines/index.md | 6 | ||||
-rw-r--r-- | doc/ci/unit_test_reports.md | 19 | ||||
-rw-r--r-- | doc/ci/yaml/README.md | 7 |
3 files changed, 27 insertions, 5 deletions
diff --git a/doc/ci/merge_request_pipelines/index.md b/doc/ci/merge_request_pipelines/index.md index 15b0403bcc0..1399bd9ec91 100644 --- a/doc/ci/merge_request_pipelines/index.md +++ b/doc/ci/merge_request_pipelines/index.md @@ -225,9 +225,9 @@ which helps you get your starting configuration correct. If you are seeing two pipelines when using `only/except`, please see the caveats related to using `only/except` above (or, consider moving to `rules`). -It is not possible to run a job for branch pipelines first, then only for merge request -pipelines after the merge request is created (skipping the duplicate branch pipeline). See -the [related issue](https://gitlab.com/gitlab-org/gitlab/-/issues/201845) for more details. +In [GitLab 13.7](https://gitlab.com/gitlab-org/gitlab/-/issues/201845) and later, +you can add `workflow:rules` to [switch from branch pipelines to merge request pipelines](../yaml/README.md#switch-between-branch-pipelines-and-merge-request-pipelines) +after a merge request is open on the branch. ### Two pipelines created when pushing an invalid CI configuration file diff --git a/doc/ci/unit_test_reports.md b/doc/ci/unit_test_reports.md index e55393a79a1..7b5f6b5167d 100644 --- a/doc/ci/unit_test_reports.md +++ b/doc/ci/unit_test_reports.md @@ -307,6 +307,25 @@ test: - report.xml ``` +### PHP example + +This example uses [PHPUnit](https://phpunit.de/) with the `--log-junit` flag. +You can also add this option using +[XML](https://phpunit.readthedocs.io/en/stable/configuration.html#the-junit-element) +in the `phpunit.xml` configuration file. + +```yaml +phpunit: + stage: test + script: + - composer install + - vendor/bin/phpunit --log-junit report.xml + artifacts: + when: always + reports: + junit: report.xml +``` + ## Viewing Unit test reports on GitLab > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24792) in GitLab 12.5 behind a feature flag (`junit_pipeline_view`), disabled by default. diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 05ce2c4d53d..d8357d455a8 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -1251,8 +1251,11 @@ causes duplicated pipelines. To avoid duplicate pipelines, you can: -- Use [`workflow`](#workflow) to specify which types of pipelines - can run. +- Use the `CI_OPEN_MERGE_REQUESTS` CI/CD variable in [`workflow:rules`](#workflow) to + [switch between branch and merge request pipelines](#switch-between-branch-pipelines-and-merge-request-pipelines) + without duplication. You can also use this variable in individual job rules. +- Use [`workflow`](#workflow) to specify that only branch pipelines or only merge request + pipelines should run. - Rewrite the rules to run the job only in very specific cases, and avoid a final `when:` rule: |