From 75118cf6a39e6e6e9ddb5cc582e8e705d6b7659d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otis=20Gospodneti=C4=87?= Date: Fri, 8 Dec 2023 17:43:50 -0500 Subject: [PATCH 1/2] Added deployment tracking section --- docs/synthetics/ci-cd/overview.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/synthetics/ci-cd/overview.md b/docs/synthetics/ci-cd/overview.md index d6526f56d..c420190c1 100644 --- a/docs/synthetics/ci-cd/overview.md +++ b/docs/synthetics/ci-cd/overview.md @@ -15,3 +15,7 @@ Using the run monitor API, you can integrate [Sematext Synthetics](../index.md) - [GitLab CI/CD](./gitlab-ci-cd/) - [Vercel](./vercel/) - [Netlify](./netlify/) + +## Deployment Tracking + +You can also track successful deployments by [sending deployment events to Sematext](../../events/event-examples/#application-deployment-tracking) using the [events API](../../events/event-api/). From b70d155f24fa31a3398c399c642791820943d9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otis=20Gospodneti=C4=87?= Date: Fri, 8 Dec 2023 17:49:19 -0500 Subject: [PATCH 2/2] Added a non-working call to events API --- docs/synthetics/ci-cd/jenkins.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/synthetics/ci-cd/jenkins.md b/docs/synthetics/ci-cd/jenkins.md index c5592970f..a3de1aa12 100644 --- a/docs/synthetics/ci-cd/jenkins.md +++ b/docs/synthetics/ci-cd/jenkins.md @@ -22,7 +22,13 @@ stage('Run Sematext monitors') { --header 'content-type: application/json' \ --data '[{"monitorId": 276}]' > results.txt cat results.txt - if [ \$(head -1 results.txt | grep -c 'failed') -ne 0 ]; then exit 1; fi + if [ \$(head -1 results.txt | grep -c 'failed') -ne 0 ]; then exit 1; else curl -XPOST "https://event-receiver.sematext.com/1111111-2222-3333-4444-555555555555/event" -d ' +{ + "timestamp" : "2024-02-17T15:29:04+0100", + "message" : "Deployment successful", + "severity": "info", + "type" : "deployment" +}' fi """ } }