Skip to content

Commit

Permalink
Show agent version, tower required version, user name and work direct…
Browse files Browse the repository at this point in the history
…ory at startup.
  • Loading branch information
jordeu committed Dec 15, 2021
1 parent 05382e6 commit 1c9ef35
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/io/seqera/tower/agent/Agent.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ private void sendInfoMessage() throws IOException {
));
}

private void validateParameters() {
private void validateParameters() throws IOException {
// Fetch username
validatedUserName = System.getProperty("user.name");
if (validatedUserName == null || validatedUserName.isEmpty() || validatedUserName.isBlank()) {
Expand All @@ -220,6 +220,13 @@ private void validateParameters() {
System.exit(-1);
}
validatedWorkDir = workDir.toAbsolutePath().normalize().toString();

String agentVersion = getVersion();
String requiredApiVersion = getVersionApi();

logger.info("TOWER AGENT v{}", agentVersion);
logger.info("Compatible with TOWER API v{}", requiredApiVersion);
logger.info("Connecting as user '{}' with default work directory '{}'", validatedUserName, validatedWorkDir);
}

/**
Expand Down

0 comments on commit 1c9ef35

Please sign in to comment.