Skip to content

Commit 69dd606

Browse files
authored
feat: send CI status to cloud (#3359)
1 parent e52b310 commit 69dd606

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

package-lock.json

+16-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/artillery/lib/platform/cloud/cloud.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const util = require('node:util');
1212
const chokidar = require('chokidar');
1313
const fs = require('fs');
1414
const path = require('path');
15+
const { isCI, name: ciName } = require('ci-info');
16+
1517
class ArtilleryCloudPlugin {
1618
constructor(_script, _events, { flags }) {
1719
this.enabled = false;
@@ -59,8 +61,13 @@ class ArtilleryCloudPlugin {
5961

6062
this.getLoadTestEndpoint = `${this.baseUrl}/api/load-tests/${this.testRunId}/status`;
6163

64+
const metadata = Object.assign({}, testInfo.metadata, {
65+
isCI,
66+
ciName
67+
});
68+
6269
await this._event('testrun:init', {
63-
metadata: testInfo.metadata
70+
metadata: metadata
6471
});
6572
this.setGetLoadTestInterval = this.setGetStatusInterval();
6673

packages/artillery/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"aws-sdk": "^2.1338.0",
117117
"chalk": "^2.4.2",
118118
"chokidar": "^3.6.0",
119-
"ci-info": "^3.8.0",
119+
"ci-info": "^4.0.0",
120120
"cli-table3": "^0.6.0",
121121
"cross-spawn": "^7.0.3",
122122
"csv-parse": "^4.16.3",

0 commit comments

Comments
 (0)