Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ci/environments/external_deployment_tools.md')
-rw-r--r--doc/ci/environments/external_deployment_tools.md78
1 files changed, 39 insertions, 39 deletions
diff --git a/doc/ci/environments/external_deployment_tools.md b/doc/ci/environments/external_deployment_tools.md
index ff3172f0e02..37c4cf05f13 100644
--- a/doc/ci/environments/external_deployment_tools.md
+++ b/doc/ci/environments/external_deployment_tools.md
@@ -1,6 +1,6 @@
---
-stage: Release
-group: Release
+stage: Deploy
+group: Environments
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
type: reference
---
@@ -14,7 +14,7 @@ GitLab can receive deployment events from these external tools and allows you to
For example, the following features are available by setting up tracking:
- [See when an merge request has been deployed, and to which environment](../../user/project/merge_requests/widgets.md#post-merge-pipeline-status).
-- [Filter merge requests by environment or deployment date](../../user/project/merge_requests/index.md#filter-merge-requests-by-environment-or-deployment-date).
+- [Filter merge requests by environment or deployment date](../../user/project/merge_requests/index.md#by-environment-or-deployment-date).
- [DevOps Research and Assessment (DORA) metrics](../../user/analytics/dora_metrics.md).
- [View environments and deployments](index.md#view-environments-and-deployments).
- [Track newly included merge requests per deployment](index.md#track-newly-included-merge-requests-per-deployment).
@@ -42,45 +42,45 @@ Here is an example setup that creates a `success` deployment record in GitLab wh
1. Create a new webhook. You can save the following manifest file and apply it by `kubectl apply -n argocd -f <manifiest-file-path>`:
- ```yaml
- apiVersion: v1
- kind: ConfigMap
- metadata:
- name: argocd-notifications-cm
- data:
- trigger.on-deployed: |
- - description: Application is synced and healthy. Triggered once per commit.
- oncePer: app.status.sync.revision
- send:
- - gitlab-deployment-status
- when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'
- template.gitlab-deployment-status: |
- webhook:
- gitlab:
- method: POST
- path: /projects/<your-project-id>/deployments
- body: |
- {
- "status": "success",
- "environment": "production",
- "sha": "{{.app.status.operationState.operation.sync.revision}}",
- "ref": "main",
- "tag": "false"
- }
- service.webhook.gitlab: |
- url: https://gitlab.com/api/v4
- headers:
- - name: PRIVATE-TOKEN
- value: <your-access-token>
- - name: Content-type
- value: application/json
- ```
+ ```yaml
+ apiVersion: v1
+ kind: ConfigMap
+ metadata:
+ name: argocd-notifications-cm
+ data:
+ trigger.on-deployed: |
+ - description: Application is synced and healthy. Triggered once per commit.
+ oncePer: app.status.sync.revision
+ send:
+ - gitlab-deployment-status
+ when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'
+ template.gitlab-deployment-status: |
+ webhook:
+ gitlab:
+ method: POST
+ path: /projects/<your-project-id>/deployments
+ body: |
+ {
+ "status": "success",
+ "environment": "production",
+ "sha": "{{.app.status.operationState.operation.sync.revision}}",
+ "ref": "main",
+ "tag": "false"
+ }
+ service.webhook.gitlab: |
+ url: https://gitlab.com/api/v4
+ headers:
+ - name: PRIVATE-TOKEN
+ value: <your-access-token>
+ - name: Content-type
+ value: application/json
+ ```
1. Create a new subscription in your application:
- ```shell
- kubectl patch app <your-app-name> -n argocd -p '{"metadata": {"annotations": {"notifications.argoproj.io/subscribe.on-deployed.gitlab":""}}}' --type merge
- ```
+ ```shell
+ kubectl patch app <your-app-name> -n argocd -p '{"metadata": {"annotations": {"notifications.argoproj.io/subscribe.on-deployed.gitlab":""}}}' --type merge
+ ```
NOTE:
If a deployment wasn't created as expected, you can troubleshoot with [`argocd-notifications` tool](https://argocd-notifications.readthedocs.io/en/stable/troubleshooting/).