Commit c5043be9 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 76bf6611 9a2d5688
...@@ -20,12 +20,11 @@ module WithPerformanceBar ...@@ -20,12 +20,11 @@ module WithPerformanceBar
end end
def cookie_or_default_value def cookie_or_default_value
cookie_enabled = if cookies[:perf_bar_enabled].present? if cookies[:perf_bar_enabled].blank? && Rails.env.development?
cookies[:perf_bar_enabled] == 'true' cookies[:perf_bar_enabled] = 'true'
else
cookies[:perf_bar_enabled] = 'true' if Rails.env.development?
end end
cookie_enabled = cookies[:perf_bar_enabled] == 'true'
cookie_enabled && Gitlab::PerformanceBar.allowed_for_user?(current_user) cookie_enabled && Gitlab::PerformanceBar.allowed_for_user?(current_user)
end end
end end
...@@ -225,9 +225,9 @@ which helps you get your starting configuration correct. ...@@ -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 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`). 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 In [GitLab 13.7](https://gitlab.com/gitlab-org/gitlab/-/issues/201845) and later,
pipelines after the merge request is created (skipping the duplicate branch pipeline). See 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)
the [related issue](https://gitlab.com/gitlab-org/gitlab/-/issues/201845) for more details. after a merge request is open on the branch.
### Two pipelines created when pushing an invalid CI configuration file ### Two pipelines created when pushing an invalid CI configuration file
......
...@@ -307,6 +307,25 @@ test: ...@@ -307,6 +307,25 @@ test:
- report.xml - 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 ## 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. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24792) in GitLab 12.5 behind a feature flag (`junit_pipeline_view`), disabled by default.
......
...@@ -1251,8 +1251,11 @@ causes duplicated pipelines. ...@@ -1251,8 +1251,11 @@ causes duplicated pipelines.
To avoid duplicate pipelines, you can: To avoid duplicate pipelines, you can:
- Use [`workflow`](#workflow) to specify which types of pipelines - Use the `CI_OPEN_MERGE_REQUESTS` CI/CD variable in [`workflow:rules`](#workflow) to
can run. [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, - Rewrite the rules to run the job only in very specific cases,
and avoid a final `when:` rule: and avoid a final `when:` rule:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment