From 175ade43107100b36506b73402234f36bac4208b Mon Sep 17 00:00:00 2001 From: delarea Date: Wed, 8 Jan 2025 10:42:50 +0200 Subject: [PATCH] Add logs --- src/main/java/io/jenkins/plugins/jfrog/JfStep.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/jenkins/plugins/jfrog/JfStep.java b/src/main/java/io/jenkins/plugins/jfrog/JfStep.java index 8d729c76..9abe6edc 100644 --- a/src/main/java/io/jenkins/plugins/jfrog/JfStep.java +++ b/src/main/java/io/jenkins/plugins/jfrog/JfStep.java @@ -143,17 +143,18 @@ protected String run() throws Exception { */ public boolean isPasswordStdinSupported(FilePath workspace, EnvVars env, Launcher launcher, String jfrogBinaryPath) throws IOException, InterruptedException { TaskListener listener = getContext().get(TaskListener.class); + JenkinsBuildInfoLog buildInfoLog = new JenkinsBuildInfoLog(listener); boolean isPluginLauncher = launcher.getClass().getName().contains("org.jenkinsci.plugins"); if (isPluginLauncher) { - listener.getLogger().println("Launcher is a plugin launcher. Password stdin is not supported."); + buildInfoLog.info("Launcher is a plugin launcher. Password stdin is not supported."); return false; } Launcher.ProcStarter procStarter = launcher.launch().envs(env).pwd(workspace); Version currentCliVersion = getJfrogCliVersion(procStarter, jfrogBinaryPath); boolean supported = currentCliVersion.isAtLeast(MIN_CLI_VERSION_PASSWORD_STDIN); - listener.getLogger().println("JFrog CLI version: " + currentCliVersion); - listener.getLogger().println("Password stdin supported: " + supported); + buildInfoLog.info("JFrog CLI version: " + currentCliVersion); + buildInfoLog.info("Password stdin supported: " + supported); return supported; }