@datadog/datadog-ci 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-3rdparty.csv +2 -0
- package/dist/commands/dsyms/__tests__/upload.test.js +219 -16
- package/dist/commands/dsyms/__tests__/utils.test.js +86 -46
- package/dist/commands/dsyms/interfaces.d.ts +14 -5
- package/dist/commands/dsyms/interfaces.js +15 -28
- package/dist/commands/dsyms/renderer.d.ts +7 -5
- package/dist/commands/dsyms/renderer.js +18 -6
- package/dist/commands/dsyms/upload.d.ts +31 -0
- package/dist/commands/dsyms/upload.js +127 -13
- package/dist/commands/dsyms/utils.d.ts +12 -6
- package/dist/commands/dsyms/utils.js +23 -51
- package/dist/commands/synthetics/__tests__/run-test.test.js +30 -24
- package/dist/commands/synthetics/__tests__/utils.test.js +19 -10
- package/dist/commands/synthetics/api.d.ts +3 -12
- package/dist/commands/synthetics/api.js +4 -1
- package/dist/commands/synthetics/command.js +4 -0
- package/dist/commands/synthetics/errors.d.ts +4 -4
- package/dist/commands/synthetics/errors.js +5 -4
- package/dist/commands/synthetics/interfaces.d.ts +1 -4
- package/dist/commands/synthetics/reporters/default.js +2 -2
- package/dist/commands/synthetics/run-test.d.ts +1 -11
- package/dist/commands/synthetics/run-test.js +5 -2
- package/dist/commands/synthetics/utils.d.ts +1 -0
- package/dist/commands/synthetics/utils.js +6 -5
- package/package.json +5 -3
|
@@ -31,7 +31,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
31
31
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.parseVariablesFromCli = exports.retry = exports.runTests = exports.getTestsToTrigger = exports.getReporter = exports.getResultDuration = exports.createSummary = exports.createTriggerResultMap = exports.waitForResults = exports.wait = exports.getSuites = exports.hasTestSucceeded = exports.hasResultPassed = exports.isCriticalError = exports.getStrictestExecutionRule = exports.getExecutionRule = exports.setCiTriggerApp = exports.handleConfig = void 0;
|
|
34
|
+
exports.parseVariablesFromCli = exports.retry = exports.runTests = exports.getTestsToTrigger = exports.getReporter = exports.getResultDuration = exports.createSummary = exports.createTriggerResultMap = exports.waitForResults = exports.wait = exports.getSuites = exports.hasTestSucceeded = exports.hasResultPassed = exports.isCriticalError = exports.getStrictestExecutionRule = exports.getExecutionRule = exports.setCiTriggerApp = exports.handleConfig = exports.ciTriggerApp = void 0;
|
|
35
35
|
const fs = __importStar(require("fs"));
|
|
36
36
|
const path = __importStar(require("path"));
|
|
37
37
|
const url_1 = require("url");
|
|
@@ -48,7 +48,7 @@ const PUBLIC_ID_REGEX = /^[\d\w]{3}-[\d\w]{3}-[\d\w]{3}$/;
|
|
|
48
48
|
const SUBDOMAIN_REGEX = /(.*?)\.(?=[^\/]*\..{2,5})/;
|
|
49
49
|
const TEMPLATE_REGEX = /{{\s*([^{}]*?)\s*}}/g;
|
|
50
50
|
const template = (st, context) => st.replace(TEMPLATE_REGEX, (match, p1) => (p1 in context ? context[p1] : match));
|
|
51
|
-
|
|
51
|
+
exports.ciTriggerApp = 'npm_package';
|
|
52
52
|
const handleConfig = (test, publicId, reporter, config) => {
|
|
53
53
|
const executionRule = exports.getExecutionRule(test, config);
|
|
54
54
|
let handledConfig = {
|
|
@@ -86,7 +86,7 @@ const handleConfig = (test, publicId, reporter, config) => {
|
|
|
86
86
|
};
|
|
87
87
|
exports.handleConfig = handleConfig;
|
|
88
88
|
const setCiTriggerApp = (source) => {
|
|
89
|
-
ciTriggerApp = source;
|
|
89
|
+
exports.ciTriggerApp = source;
|
|
90
90
|
};
|
|
91
91
|
exports.setCiTriggerApp = setCiTriggerApp;
|
|
92
92
|
const parseUrlVariables = (url, reporter) => {
|
|
@@ -425,8 +425,9 @@ exports.getTestsToTrigger = getTestsToTrigger;
|
|
|
425
425
|
const runTests = (api, testsToTrigger) => __awaiter(void 0, void 0, void 0, function* () {
|
|
426
426
|
const payload = { tests: testsToTrigger };
|
|
427
427
|
const ciMetadata = ci_1.getCIMetadata();
|
|
428
|
-
|
|
429
|
-
|
|
428
|
+
if (ciMetadata) {
|
|
429
|
+
payload.metadata = ciMetadata;
|
|
430
|
+
}
|
|
430
431
|
try {
|
|
431
432
|
return yield api.triggerTests(payload);
|
|
432
433
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datadog/datadog-ci",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Run datadog actions from the CI.",
|
|
5
5
|
"repository": "https://github.com/DataDog/datadog-ci",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -64,8 +64,9 @@
|
|
|
64
64
|
"glob": "7.1.4",
|
|
65
65
|
"inquirer": "8.2.0",
|
|
66
66
|
"proxy-agent": "5.0.0",
|
|
67
|
-
"
|
|
68
|
-
"
|
|
67
|
+
"rimraf": "^3.0.2",
|
|
68
|
+
"simple-git": "3.3.0",
|
|
69
|
+
"ssh2": "1.8.0",
|
|
69
70
|
"ssh2-streams": "0.4.10",
|
|
70
71
|
"sshpk": "1.16.1",
|
|
71
72
|
"tiny-async-pool": "1.2.0",
|
|
@@ -83,6 +84,7 @@
|
|
|
83
84
|
"@types/inquirer": "8.1.3",
|
|
84
85
|
"@types/jest": "24.0.15",
|
|
85
86
|
"@types/node": "10.17.57",
|
|
87
|
+
"@types/rimraf": "^3.0.2",
|
|
86
88
|
"@types/ssh2": "0.5.46",
|
|
87
89
|
"@types/ssh2-streams": "0.1.8",
|
|
88
90
|
"@types/sshpk": "1.10.5",
|