Skip to content

Commit

Permalink
Merge pull request #55 from jenkinsci/2020.4.x_proxy
Browse files Browse the repository at this point in the history
2020.4.x proxy
  • Loading branch information
ghannamz authored Nov 12, 2020
2 parents 514623b + f2d2c95 commit 82b71fd
Show file tree
Hide file tree
Showing 12 changed files with 243 additions and 55 deletions.
19 changes: 6 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,27 @@ dependencies {
compileOnly 'com.intellij:annotations:12.0',
'org.slf4j:slf4j-api:1.6.1'

compile 'com.checkmarx:cx-client-common:2020.4.96',
compile 'com.checkmarx:cx-client-common:2020.4.107',
'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.5',
'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.5'

optionalJenkinsPlugins 'org.jenkins-ci.main:maven-plugin:1.509.4@jar',
'org.jenkins-ci.plugins:credentials:2.1.19@jar'


testCompile 'junit:junit:4.13.1',
'org.eclipse.sisu:org.eclipse.sisu.plexus:0.0.0.M5',
'org.jmockit:jmockit:1.16'


// Fails with Gradle 2.12 and up without it. Related to https://issues.jenkins-ci.org/browse/JENKINS-17129
jenkinsTest 'org.jenkins-ci.plugins:ant:1.2@jar',
'org.jenkins-ci.plugins:mailer:1.32.1@jar',
'org.jenkins-ci.plugins:matrix-project:1.18@jar'

testImplementation('org.junit.jupiter:junit-jupiter-api:5.4.2',
'org.mockito:mockito-junit-jupiter:2.23.0')
'org.mockito:mockito-junit-jupiter:2.23.0')
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.4.2',
'org.mockito:mockito-junit-jupiter:2.23.0')
'org.mockito:mockito-junit-jupiter:2.23.0')
}


jenkinsPlugin {
// version of Jenkins core this plugin depends on
coreVersion = '2.77'
Expand Down Expand Up @@ -102,12 +98,9 @@ jenkinsPlugin {

developers {
developer {
id 'checkmarxsupport'
name 'Checkmarx Support'
}
developer {
id 'galdor'
name 'Gal Dor'
id 'iland'
name 'Ilan Dayan'
}
}
}

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
description = Provides automatic scan of code by Checkmarx server and shows results summary and trend in Jenkins interface.
group = com.checkmarx.jenkins
version = 2020.4.3
version = 2020.4.8

repositoryVersion=

Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/checkmarx/jenkins/CommonClientFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ class CommonClientFactory {

static LegacyClient getInstance(CxCredentials credentials,
boolean enableCertificateValidation,
Logger log)
Logger log, boolean isProxy)
throws MalformedURLException, CxClientException {
CxScanConfig scanConfig = new CxScanConfig(credentials.getServerUrl(),
credentials.getUsername(),
Aes.decrypt(credentials.getPassword(), credentials.getUsername()),
SCAN_ORIGIN,
!enableCertificateValidation);

scanConfig.setProxyConfig(ProxyHelper.getProxyConfig());
if (isProxy) {
scanConfig.setProxyConfig(ProxyHelper.getProxyConfig());
}

return getInstance(scanConfig, log);
}
Expand Down
Loading

0 comments on commit 82b71fd

Please sign in to comment.