Skip to content

Commit 4e07017

Browse files
authored
Merge pull request #311 from atlassian/GUA-708-fix-deployment-pipeline
GUA-708: fix deployment pipeline
2 parents c71f6e6 + 31140ec commit 4e07017

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/src/analytics/analytics-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ interface Options {
7575
export const sendAnalytics = async (cloudId: string, eventPayload: EventPayload, accountId?: string, anonymousId?: string): Promise<void> => {
7676
console.info('Analytics Request');
7777

78-
sendEvent(cloudId, eventPayload, accountId, anonymousId)
78+
await sendEvent(cloudId, eventPayload, accountId, anonymousId)
7979
.then(() => console.info('Analytics event processed'))
8080
.catch((e) => console.error({ e }, 'Failed to send analytics event'));
8181
};

app/src/storage/update-jenkins-server-state.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async function updateJenkinsServerState(
8989
}
9090
}
9191

92-
function sendConnectionAnalytics(cloudId: string, jenkinsServer: JenkinsServer): void {
92+
async function sendConnectionAnalytics(cloudId: string, jenkinsServer: JenkinsServer): Promise<void> {
9393
const hasConfigData = !!jenkinsServer.pluginConfig?.ipAddress;
9494
if (hasConfigData) {
9595
return;
@@ -100,7 +100,7 @@ function sendConnectionAnalytics(cloudId: string, jenkinsServer: JenkinsServer):
100100
actionSubject: AnalyticsTrackEventActionSubjectsEnum.ConfigDataReceived
101101
};
102102

103-
sendAnalytics(cloudId, eventPayload, '', jenkinsServer.pluginConfig?.ipAddress);
103+
await sendAnalytics(cloudId, eventPayload, '', jenkinsServer.pluginConfig?.ipAddress);
104104
}
105105

106106
async function updateJenkinsPluginConfigState(
@@ -111,7 +111,7 @@ async function updateJenkinsPluginConfigState(
111111
): Promise<void> {
112112
try {
113113
const jenkinsServer = await getJenkinsServer(uuid, logger);
114-
sendConnectionAnalytics(cloudId, jenkinsServer);
114+
await sendConnectionAnalytics(cloudId, jenkinsServer);
115115
const {
116116
ipAddress, autoBuildEnabled, autoBuildRegex, autoDeploymentsEnabled, autoDeploymentsRegex
117117
} = jenkinsEvent;

0 commit comments

Comments
 (0)