Commit 843b689e authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 3340b375 1cc334e1
<script>
import { GlTooltipDirective, GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { GlTooltipDirective, GlButton } from '@gitlab/ui';
export default {
name: 'ReplyButton',
components: {
GlIcon,
GlDeprecatedButton,
GlButton,
},
directives: {
GlTooltip: GlTooltipDirective,
......@@ -15,17 +14,17 @@ export default {
<template>
<div class="note-actions-item">
<gl-deprecated-button
<gl-button
ref="button"
v-gl-tooltip
class="note-action-button"
data-track-event="click_button"
data-track-label="reply_comment_button"
variant="transparent"
category="tertiary"
size="small"
icon="comment"
:title="__('Reply to comment')"
:aria-label="__('Reply to comment')"
@click="$emit('startReplying')"
>
<gl-icon name="comment" class="link-highlight" />
</gl-deprecated-button>
/>
</div>
</template>
......@@ -18,6 +18,7 @@ Queries that continue to use the old format will show no data.
GitLab supports a limited set of [CI variables](../../../ci/variables/README.md) in the Prometheus query. This is particularly useful for identifying a specific environment, for example with `ci_environment_slug`. The supported variables are:
- `environment_filter`
- `ci_environment_slug`
- `kube_namespace`
- `ci_project_name`
......@@ -29,6 +30,14 @@ GitLab supports a limited set of [CI variables](../../../ci/variables/README.md)
NOTE: **Note:**
Variables for Prometheus queries must be lowercase.
### environment_filter
`environment_filter` is automatically expanded to `container_name!="POD",environment="ENVIRONMENT_NAME"`
where `ENVIRONMENT_NAME` is the name of the current environment.
For example, a Prometheus query like `container_memory_usage_bytes{ {{environment_filter}} }`
becomes `container_memory_usage_bytes{ container_name!="POD",environment="production" }`.
### __range
The `__range` variable is useful in Prometheus
......
......@@ -79,16 +79,17 @@ git push origin v1.0.0
Now that the basics of our project is completed, we can publish the package.
To publish the package, you need:
- A personal access token. You can generate a [personal access token](../../../user/profile/personal_access_tokens.md) with the scope set to `api` for repository authentication.
NOTE: **Note:**
- A personal access token or `CI_JOB_TOKEN`.
[Deploy tokens](./../../project/deploy_tokens/index.md) are not yet supported for use with Composer.
([Deploy tokens](./../../project/deploy_tokens/index.md) are not yet supported for use with Composer.)
- Your project ID which can be found on the home page of your project.
To publish the package hosted on GitLab, make a `POST` request to the GitLab package API.
A tool like `curl` can be used to make this request:
You can generate a [personal access token](../../../user/profile/personal_access_tokens.md) with the scope set to `api` for repository authentication. For example:
```shell
curl --data tag=<tag> 'https://__token__:<personal-access-token>@gitlab.com/api/v4/projects/<project_id>/packages/composer'
```
......@@ -101,6 +102,21 @@ Where:
If the above command succeeds, you now should be able to see the package under the **Packages & Registries** section of your project page.
### Publishing the package with CI/CD
To work with Composer commands within [GitLab CI/CD](./../../../ci/README.md), you can
publish Composer packages by using `CI_JOB_TOKEN` in your `.gitlab-ci.yml` file:
```yaml
stages:
- deploy
deploy:
stage: deploy
script:
- 'curl --header "Job-Token: $CI_JOB_TOKEN" --data tag=<tag> "https://gitlab.example.com/api/v4/projects/$CI_PROJECT_ID/packages/composer"'
```
### Installing a package
To install your package, you need:
......
......@@ -18,6 +18,8 @@ The [Prometheus service](../prometheus.md) must be enabled.
NGINX server metrics are detected, which tracks the pages and content directly served by NGINX.
[`environment_filter`](../../../../operations/metrics/dashboards/variables.md#environment_filter) is one of the predefined variables that metrics dashboards support.
| Name | Query |
| ---- | ----- |
| Throughput (req/sec) | `sum(rate(nginx_server_requests{server_zone!="*", server_zone!="_", %{environment_filter}}[2m])) by (code)` |
......
......@@ -131,7 +131,7 @@ module QA
def add_comment_to_diff(text)
wait_until(sleep_interval: 5) do
has_text?("No newline at end of file")
has_css?('a[data-linenumber="1"]')
end
all_elements(:new_diff_line, minimum: 1).first.hover
click_element(:diff_comment)
......
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