Skip to content

Commit

Permalink
Support pipe and new line in the 'No proxy host'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan770 committed Sep 19, 2024
1 parent 411956b commit b6e3157
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ private static void excludeProxyEnvFromPublishing(EnvVars env) {
String jfrogCliEnvExclude = env.getOrDefault(JFROG_CLI_ENV_EXCLUDE, JFROG_CLI_DEFAULT_EXCLUSIONS);
env.put(JFROG_CLI_ENV_EXCLUDE, String.join(";", jfrogCliEnvExclude, HTTP_PROXY_ENV, HTTPS_PROXY_ENV));
}

/**
* Converts a list of No Proxy Hosts received by Jenkins into a semicolon-separated string format expected by JFrog CLI.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.Arrays;
import java.util.Collection;

import static io.jenkins.plugins.jfrog.CliEnvConfigurator.noProxyExtractor;
import static io.jenkins.plugins.jfrog.CliEnvConfigurator.createNoProxyValue;
import static org.junit.Assert.assertEquals;

/**
Expand Down Expand Up @@ -42,6 +42,6 @@ public static Collection<Object[]> dataProvider() {

@Test
public void testNoProxyExtractor() {
assertEquals(expectedResult, noProxyExtractor(noProxyList));
assertEquals(expectedResult, createNoProxyValue(noProxyList));
}
}

0 comments on commit b6e3157

Please sign in to comment.