Skip to content

Commit

Permalink
Merge pull request #318 from sentryinsurance/FixProxyConfig
Browse files Browse the repository at this point in the history
[#317] Pass noproxy list to the client
  • Loading branch information
Stericson authored Jan 24, 2024
2 parents 35e5a6d + 478e785 commit 8ce3134
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.amazonaws.retry.RetryPolicy;
import com.cloudbees.jenkins.plugins.awscredentials.AWSCredentialsHelper;
import com.cloudbees.jenkins.plugins.awscredentials.AmazonWebServicesCredentials;
import com.google.common.base.Joiner;
import hudson.ProxyConfiguration;
import jenkins.model.Jenkins;
import org.apache.commons.lang.StringUtils;
Expand Down Expand Up @@ -38,6 +39,10 @@ protected ClientConfiguration createClientConfiguration() {
clientConfiguration.setProxyPort(proxy.port);
clientConfiguration.setProxyUsername(proxy.getUserName());
clientConfiguration.setProxyPassword(proxy.getPassword());
if (proxy.getNoProxyHost() != null) {
String[] noProxyParts = proxy.getNoProxyHost().split("[ \t\n,|]+");
clientConfiguration.setNonProxyHosts(Joiner.on(',').join(noProxyParts));

Check warning on line 44 in src/main/java/com/cloudbees/jenkins/plugins/amazonecs/aws/BaseAWSService.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 42-44 are not covered by tests
}
}

clientConfiguration.setRetryPolicy(ecsRetryPolicy());
Expand Down

0 comments on commit 8ce3134

Please sign in to comment.