Skip to content

Commit bdc6aab

Browse files
Merge pull request #220 from japneetlambdatest/CYP-71
Auto download artefacts when sync is used
2 parents b2761d5 + e29c704 commit bdc6aab

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

commands/generate_reports.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ function generate_report(args) {
150150
if ("reject_unauthorized" in args) {
151151
if (
152152
args["reject_unauthorized"] != "false" &&
153-
args["reject_unauthorized"] != "true"
153+
args["reject_unauthorized"] != "true" &&
154+
args["reject_unauthorized"] != true &&
155+
args["reject_unauthorized"] != false
154156
) {
155157
console.log("reject_unauthorized has to boolean");
156158
return;

commands/utils/poller/poller.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const poller = require("./build_stats.js");
22
const async = require("async");
33
const build_stats = require("./build_stats.js");
4+
const reports = require("../../../commands/generate_reports.js");
45
var build_result = true;
56

67
function poll_build(lt_config, session_id, env) {
@@ -39,6 +40,18 @@ function poll_build(lt_config, session_id, env) {
3940
}
4041
console.table(status);
4142
console.log(stats);
43+
//Download the artefacts if downloads is passed
44+
if (lt_config.run_settings.downloads != "") {
45+
let args = {
46+
user: lt_config.lambdatest_auth.username,
47+
access_key: lt_config.lambdatest_auth.access_key,
48+
session_id: session_id,
49+
env: env,
50+
reject_unauthorized:
51+
lt_config.run_settings.reject_unauthorized,
52+
};
53+
reports(args);
54+
}
4255
if (
4356
Object.keys(stats).length == 1 &&
4457
(Object.keys(stats).includes("completed") ||

0 commit comments

Comments
 (0)