Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/brain/gocd/gocdDataDog/deployDatadogEvents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('GocdDatadogEvents', () => {
expect(message).toEqual({
body: {
title:
'GoCD: deploying <getsentry-control-frontend> <deploy> <In progress> in all',
'GoCD: deploying <getsentry-control-frontend> <deploy-getsentry-control-frontend-test> <deploy> <In progress> in all',
text:
'%%% \n' +
'GoCD auto-deployment started from: [getsentry@d2501d598f97](https://github.com/getsentry/getsentry/commits/d2501d598f97829b43627ba5d5721013f1d217dc),\n' +
Expand Down Expand Up @@ -132,7 +132,7 @@ describe('GocdDatadogEvents', () => {
expect(message).toEqual({
body: {
title:
'GoCD: deploying <getsentry-control-frontend> <deploy> <Cancelled> in all',
'GoCD: deploying <getsentry-control-frontend> <deploy-getsentry-control-frontend-test> <deploy> <Cancelled> in all',
text:
'%%% \n' +
'GoCD deployment started by <@U018H4DA8N5> from: [getsentry@d2501d598f97](https://github.com/getsentry/getsentry/commits/d2501d598f97829b43627ba5d5721013f1d217dc),\n' +
Expand Down Expand Up @@ -243,7 +243,9 @@ describe('GocdDatadogEvents', () => {
const message = datadogApiInstanceSpy.mock.calls[0][0];
expect(message).toEqual({
body: {
title: 'GoCD: deploying <sentryio> <deploying> <In progress> in all',
title:
'GoCD: deploying <sentryio> <getsentry_frontend> <deploying> ' +
<In progress> in all',
text:
'%%% \n' +
'GoCD deployment started from: [getsentry@2b0034becc4a](https://github.com/getsentry/getsentry/commits/2b0034becc4ab26b985f4c1a08ab068f153c274c),\n' +
Expand Down Expand Up @@ -276,7 +278,9 @@ describe('GocdDatadogEvents', () => {
const message = datadogApiInstanceSpy.mock.calls[0][0];
expect(message).toEqual({
body: {
title: 'GoCD: deploying <snuba> <st_migrate> <Passed> in us',
title:
'GoCD: deploying <snuba> <deploy-snuba-us> <st_migrate> ' +
<Passed> in us',
text:
'%%% \n' +
'GoCD auto-deployment started from: [snuba@4d71a785da42](https://github.com/getsentry/snuba/commits/4d71a785da42db5606c2c82bb5a91adfb5006fc7),\n' +
Expand Down
5 changes: 4 additions & 1 deletion src/brain/gocd/gocdDataDog/deployDatadogEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ export class DeployDatadogEvents {
// getsentry-frontend
const service = pipeline.group;

// deploy-getsentry-backend-us
const pipelineName = pipeline.name;

// getsentry@h92mfyw
// let repoSha = this.getRepoSha(pipeline);

Expand All @@ -304,7 +307,7 @@ export class DeployDatadogEvents {
const sentry_user_tags = authors.map((user) => `sentry_user:${user.login}`);

// Title: GoCD: deploy sha (started/failed/completed) in <insert>-region
const title = `GoCD: deploying <${service}> <${stageName}> <${pipelineResult}> in ${region}`;
const title = `GoCD: deploying <${service}> <${pipelineName}> <${stageName}> <${pipelineResult}> in ${region}`;
// Automatic deploy triggered by <github push?> to track details visit: https://deploy.getsentry.net/go/pipelines/value_stream_map/deploy-getsentry-backend-s4s/2237
const text = `%%% \n${deploymentReason} from: ${commitShaLink},\n \n ${commitDiffLink} \n GoCD:${stageLink} \n\n *this message was produced by a eng-pipes gocd brain module* \n %%%`;
// Tags: source:gocd customer_name:s4s sentry_region:s4s source_tool:gocd sentry_user:git commit email source_category:infra-tools
Expand Down
Loading