Skip to content

Commit 9fd66c0

Browse files
Merge pull request #159 from japneetlambdatest/dev
new staging env added
2 parents 2885917 + b013e3f commit 9fd66c0

File tree

6 files changed

+21
-9
lines changed

6 files changed

+21
-9
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
@@ -121,7 +121,7 @@ function generate_report(args) {
121121
env = args["env"];
122122
} else {
123123
console.log(
124-
"Environment can be stage, beta or prod, setting Env to prod"
124+
"Environment can be stage,stage_new, beta or prod, setting Env to prod"
125125
);
126126
}
127127
}

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
validate_cli

commands/utils/constants.js

Lines changed: 12 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,17 @@ 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://stage-api.lambdatesting.com/liis",
50+
BUILD_BASE_URL:
51+
"https://stage-api.lambdatesting.com/automation/api/v1/builds/",
52+
BUILD_STOP_URL:
53+
"https://stage-api.lambdatesting.com/api/v1/test/stop?sessionId=",
54+
SESSION_URL:
55+
"https://stage-api.lambdatesting.com/automation/api/v1/sessions?limit=200&session_id=",
56+
REPORT_URL:
57+
"https://stage-api.lambdatesting.com/automation/api/v1/cypress/artefacts/test/",
58+
},
4859
preprod: {
4960
INTEGRATION_BASE_URL: "https://preprod-api.lambdatest.com/liis",
5061
BUILD_BASE_URL:

commands/utils/uploader.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ function upload_zip(lt_config, file_name, prefix = "project", env = "prod") {
6161
},
6262
};
6363
options["formData"][file_name] = fs.readFileSync(file_name);
64-
let responseData = null;
6564
request.put(options, function (err, resp, body) {
6665
if (err) {
6766
console.log("error occured while uploading project", err);
6867
reject(err);
6968
} else {
7069
if (resp.statusCode != 200) {
71-
if (responseData && responseData["error"]) {
72-
reject(responseData["error"]);
70+
if (resp && resp["error"]) {
71+
reject(resp["error"]);
7372
} else {
74-
reject("error", responseData);
73+
console.log("Error occured in uploading", resp);
74+
reject("error", resp);
7575
}
7676
} else {
7777
console.log(`Uploaded ` + prefix + ` file successfully`);

0 commit comments

Comments
 (0)