Skip to content

Commit 040a8b8

Browse files
Merge branch 'dev' into MLE-10458
2 parents 539ce9d + ea566fa commit 040a8b8

File tree

6 files changed

+32
-8
lines changed

6 files changed

+32
-8
lines changed

commands/build_info.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function get_build_info(args) {
3535
env = args["env"];
3636
} else {
3737
console.log(
38-
"Environment can be stage, beta or prod, setting Env to prod"
38+
"Environment can be stage,stage_new, beta or prod, setting Env to prod"
3939
);
4040
}
4141
}

commands/build_stop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function stop_session(args) {
6060
env = args["env"];
6161
} else {
6262
console.log(
63-
"Environment can be stage, beta or prod, setting Env to prod"
63+
"Environment can be stage,stage_new, beta or prod, setting Env to prod"
6464
);
6565
}
6666
}

commands/generate_reports.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function generate_report(args) {
131131
env = args["env"];
132132
} else {
133133
console.log(
134-
"Environment can be stage, beta or prod, setting Env to prod"
134+
"Environment can be stage,stage_new, beta or prod, setting Env to prod"
135135
);
136136
}
137137
}

commands/run.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ module.exports = function (args) {
2424
env = args["env"];
2525
} else {
2626
console.log(
27-
"Environment can be stage, beta, preprod or prod, setting Env to prod"
27+
"Environment can be stage,stage_new, beta, preprod or prod, setting Env to prod"
2828
);
29+
return;
2930
}
3031
}
3132
let rejectUnauthorized = true;

commands/utils/constants.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
"&status=running,queued,created,initiated,pqueued,error,lambda error,failed",
1414
BUILD_ERROR_STATES: "&status=error,lambda error,failed",
1515
CYPRESS_ENV_FILE_PATH: "cypress.env.json",
16-
ENVS: ["stage", "beta", "prod", "preprod"],
16+
ENVS: ["stage", "beta", "prod", "preprod", "stage_new"],
1717
prod: {
1818
INTEGRATION_BASE_URL: "https://api.lambdatest.com/liis",
1919
BUILD_BASE_URL: "https://api.lambdatest.com/automation/api/v1/builds/",
@@ -45,6 +45,28 @@ module.exports = {
4545
REPORT_URL:
4646
"https://stage-api.lambdatest.com/automation/api/v1/cypress/artefacts/test/",
4747
},
48+
stage_new: {
49+
INTEGRATION_BASE_URL: "https://api.lambdatestinternal.com/liis",
50+
BUILD_BASE_URL:
51+
"https://api.lambdatestinternal.com/automation/api/v1/builds/",
52+
BUILD_STOP_URL:
53+
"https://api.lambdatestinternal.com/api/v1/test/stop?sessionId=",
54+
SESSION_URL:
55+
"https://api.lambdatestinternal.com/automation/api/v1/sessions?limit=200&session_id=",
56+
REPORT_URL:
57+
"https://api.lambdatestinternal.com/automation/api/v1/cypress/artefacts/test/",
58+
},
59+
stage_new1: {
60+
INTEGRATION_BASE_URL: "https://prestage-api.lambdatest.com/liis",
61+
BUILD_BASE_URL:
62+
"https://prestage-api.lambdatest.com/automation/api/v1/builds/",
63+
BUILD_STOP_URL:
64+
"https://prestage-api.lambdatest.com/api/v1/test/stop?sessionId=",
65+
SESSION_URL:
66+
"https://prestage-api.lambdatest.com/automation/api/v1/sessions?limit=200&session_id=",
67+
REPORT_URL:
68+
"https://prestage-api.lambdatest.com/automation/api/v1/cypress/artefacts/test/",
69+
},
4870
preprod: {
4971
INTEGRATION_BASE_URL: "https://preprod-api.lambdatest.com/liis",
5072
BUILD_BASE_URL:

commands/utils/uploader.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ function upload_zip(lt_config, file_name, prefix = "project", env = "prod") {
7878
reject(err);
7979
} else {
8080
if (resp.statusCode != 200) {
81-
if (responseData && responseData["error"]) {
82-
reject(responseData["error"]);
81+
if (resp && resp["error"]) {
82+
reject(resp["error"]);
8383
} else {
84-
reject("error", responseData);
84+
console.log("Error occured in uploading", resp);
85+
reject("error", resp);
8586
}
8687
} else {
8788
console.log(`Uploaded ` + prefix + ` file successfully`);

0 commit comments

Comments
 (0)