Skip to content

Commit

Permalink
Merge pull request #59 from zebrunner/#58
Browse files Browse the repository at this point in the history
#58: added ci_build_url param
  • Loading branch information
vdelendik authored May 12, 2023
2 parents bf3d689 + e73486f commit a6c3336
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/zebrunner/carina/utils/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ public enum Parameter {

PROXY_SET_TO_SYSTEM("proxy_set_to_system"),

@Deprecated
REPORT_URL("report_url"),

CI_BUILD_URL("ci_build_url"),

AUTO_SCREENSHOT("auto_screenshot"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,13 +687,9 @@ public static String getCucumberReportLink() {
String fileName = SpecialKeywords.CUCUMBER_REPORT_FILE_NAME;

String link = "";
if (!Configuration.get(Configuration.Parameter.REPORT_URL).isEmpty()) {
String reportUrl = Configuration.get(Configuration.Parameter.REPORT_URL);
if (reportUrl.contains("n/a")) {
LOGGER.error("Contains n/a. Replace it.");
reportUrl = reportUrl.replace("n/a", "");
}
link = String.format("%s/%d/%s/%s/%s", reportUrl, rootID, folder, subFolder, fileName);
if (!Configuration.get(Configuration.Parameter.CI_BUILD_URL).isEmpty()) {
String ciBuildUrl = Configuration.get(Configuration.Parameter.CI_BUILD_URL);
link = String.format("%s/%s", ciBuildUrl, "CucumberReport");
} else {
link = String.format("file://%s/%s/%s/%s", getBaseDirAbsolutePath(), folder, subFolder, fileName);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
retry_count=0
date_format=HH:mm:ss yyyy-MM-dd
time_format=HH:mm:ss
ci_build_url=

0 comments on commit a6c3336

Please sign in to comment.