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

Automatic merge of gitlab-org/gitlab master

parents 3340b375 1cc334e1
<script> <script>
import { GlTooltipDirective, GlDeprecatedButton, GlIcon } from '@gitlab/ui'; import { GlTooltipDirective, GlButton } from '@gitlab/ui';
export default { export default {
name: 'ReplyButton', name: 'ReplyButton',
components: { components: {
GlIcon, GlButton,
GlDeprecatedButton,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -15,17 +14,17 @@ export default { ...@@ -15,17 +14,17 @@ export default {
<template> <template>
<div class="note-actions-item"> <div class="note-actions-item">
<gl-deprecated-button <gl-button
ref="button" ref="button"
v-gl-tooltip v-gl-tooltip
class="note-action-button"
data-track-event="click_button" data-track-event="click_button"
data-track-label="reply_comment_button" data-track-label="reply_comment_button"
variant="transparent" category="tertiary"
size="small"
icon="comment"
:title="__('Reply to comment')" :title="__('Reply to comment')"
:aria-label="__('Reply to comment')"
@click="$emit('startReplying')" @click="$emit('startReplying')"
> />
<gl-icon name="comment" class="link-highlight" />
</gl-deprecated-button>
</div> </div>
</template> </template>
...@@ -18,6 +18,7 @@ Queries that continue to use the old format will show no data. ...@@ -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: 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` - `ci_environment_slug`
- `kube_namespace` - `kube_namespace`
- `ci_project_name` - `ci_project_name`
...@@ -29,6 +30,14 @@ GitLab supports a limited set of [CI variables](../../../ci/variables/README.md) ...@@ -29,6 +30,14 @@ GitLab supports a limited set of [CI variables](../../../ci/variables/README.md)
NOTE: **Note:** NOTE: **Note:**
Variables for Prometheus queries must be lowercase. 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 ### __range
The `__range` variable is useful in Prometheus The `__range` variable is useful in Prometheus
......
...@@ -79,16 +79,17 @@ git push origin v1.0.0 ...@@ -79,16 +79,17 @@ git push origin v1.0.0
Now that the basics of our project is completed, we can publish the package. Now that the basics of our project is completed, we can publish the package.
To publish the package, you need: 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. - A personal access token or `CI_JOB_TOKEN`.
NOTE: **Note:**
[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. - 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. 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: 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 ```shell
curl --data tag=<tag> 'https://__token__:<personal-access-token>@gitlab.com/api/v4/projects/<project_id>/packages/composer' curl --data tag=<tag> 'https://__token__:<personal-access-token>@gitlab.com/api/v4/projects/<project_id>/packages/composer'
``` ```
...@@ -101,6 +102,21 @@ Where: ...@@ -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. 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 ### Installing a package
To install your package, you need: To install your package, you need:
......
...@@ -18,6 +18,8 @@ The [Prometheus service](../prometheus.md) must be enabled. ...@@ -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. 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 | | Name | Query |
| ---- | ----- | | ---- | ----- |
| Throughput (req/sec) | `sum(rate(nginx_server_requests{server_zone!="*", server_zone!="_", %{environment_filter}}[2m])) by (code)` | | Throughput (req/sec) | `sum(rate(nginx_server_requests{server_zone!="*", server_zone!="_", %{environment_filter}}[2m])) by (code)` |
......
...@@ -131,7 +131,7 @@ module QA ...@@ -131,7 +131,7 @@ module QA
def add_comment_to_diff(text) def add_comment_to_diff(text)
wait_until(sleep_interval: 5) do wait_until(sleep_interval: 5) do
has_text?("No newline at end of file") has_css?('a[data-linenumber="1"]')
end end
all_elements(:new_diff_line, minimum: 1).first.hover all_elements(:new_diff_line, minimum: 1).first.hover
click_element(:diff_comment) 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