Skip to content

Commit

Permalink
[java] display external build url on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
kb-kerem committed Apr 16, 2024
1 parent 1a8c255 commit c8a5d04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private WebdriverSessionInfoQuery.Result webdriverSessionInfo() {
*
* @param url The url to the VisualBuild
*/
private static String getStartupMessage(String url) {
static String getStartupMessage(String url) {
StringBuilder sb = new StringBuilder();
sb.append("\n")
.append("\n")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.saucelabs.visual;

import static com.saucelabs.visual.VisualApi.getStartupMessage;
import static com.saucelabs.visual.utils.EnvironmentVariables.isNotBlank;

import com.saucelabs.visual.VisualApi.BuildAttributes;
Expand Down Expand Up @@ -66,6 +67,7 @@ public static VisualBuild getBuildOnce(VisualApi api, BuildAttributes buildAttri
VisualBuild externalBuild = getExternalBuild(api);
if (externalBuild != null) {
build = externalBuild;
log.info(getStartupMessage(build.url));
} else {
build = api.createBuild(buildAttributes);
Runtime.getRuntime().addShutdownHook(new Thread(() -> api.finishBuild(build.id)));
Expand Down

0 comments on commit c8a5d04

Please sign in to comment.