-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from jenkinsci/config-as-code
Following are the changes in this version 1. Support for config as code feature 2. Support for cx Origin and cx Origin Url feature 3. Includes few bug fixes
- Loading branch information
Showing
11 changed files
with
586 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
349 changes: 337 additions & 12 deletions
349
src/main/java/com/checkmarx/jenkins/CxScanBuilder.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/main/java/com/checkmarx/jenkins/configascode/ConfigAsCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.checkmarx.jenkins.configascode; | ||
|
||
import com.typesafe.config.Optional; | ||
|
||
public class ConfigAsCode { | ||
@Optional | ||
private String project; | ||
@Optional | ||
private String team; | ||
@Optional | ||
private SastConfig sast; | ||
@Optional | ||
private ScaConfig sca; | ||
|
||
public ConfigAsCode() { | ||
} | ||
|
||
public String getTeam() { | ||
return team; | ||
} | ||
|
||
public void setTeam(String team) { | ||
this.team = team; | ||
} | ||
|
||
public SastConfig getSast() { | ||
return sast; | ||
} | ||
|
||
public void setSast(SastConfig sast) { | ||
this.sast = sast; | ||
} | ||
|
||
public String getProject() { | ||
return project; | ||
} | ||
|
||
public void setProject(String project) { | ||
this.project = project; | ||
} | ||
|
||
public ScaConfig getSca() { | ||
return sca; | ||
} | ||
|
||
public void setSca(ScaConfig sca) { | ||
this.sca = sca; | ||
} | ||
} |
100 changes: 100 additions & 0 deletions
100
src/main/java/com/checkmarx/jenkins/configascode/SastConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package com.checkmarx.jenkins.configascode; | ||
|
||
import com.typesafe.config.Optional; | ||
|
||
public class SastConfig { | ||
@Optional | ||
private String preset; | ||
@Optional | ||
private String engineConfiguration; | ||
@Optional | ||
private String includeExcludePattern; | ||
@Optional | ||
private String excludeFolders; | ||
@Optional | ||
private boolean incremental; | ||
@Optional | ||
private boolean privateScan; | ||
@Optional | ||
private int low; | ||
@Optional | ||
private int medium; | ||
@Optional | ||
private int high; | ||
|
||
|
||
public SastConfig() { | ||
} | ||
|
||
public String getPreset() { | ||
return preset; | ||
} | ||
|
||
public void setPreset(String preset) { | ||
this.preset = preset; | ||
} | ||
|
||
public String getEngineConfiguration() { | ||
return engineConfiguration; | ||
} | ||
|
||
public void setEngineConfiguration(String engineConfiguration) { | ||
this.engineConfiguration = engineConfiguration; | ||
} | ||
|
||
public String getIncludeExcludePattern() { | ||
return includeExcludePattern; | ||
} | ||
|
||
public void setIncludeExcludePattern(String includeExcludePattern) { | ||
this.includeExcludePattern = includeExcludePattern; | ||
} | ||
|
||
public String getExcludeFolders() { | ||
return excludeFolders; | ||
} | ||
|
||
public void setExcludeFolders(String excludeFolders) { | ||
this.excludeFolders = excludeFolders; | ||
} | ||
|
||
public boolean isIncremental() { | ||
return incremental; | ||
} | ||
|
||
public void setIncremental(boolean incremental) { | ||
this.incremental = incremental; | ||
} | ||
|
||
public int getLow() { | ||
return low; | ||
} | ||
|
||
public void setLow(int low) { | ||
this.low = low; | ||
} | ||
|
||
public int getMedium() { | ||
return medium; | ||
} | ||
|
||
public void setMedium(int medium) { | ||
this.medium = medium; | ||
} | ||
|
||
public int getHigh() { | ||
return high; | ||
} | ||
|
||
public void setHigh(int high) { | ||
this.high = high; | ||
} | ||
|
||
public boolean isPrivateScan() { | ||
return privateScan; | ||
} | ||
|
||
public void setPrivateScan(boolean privateScan) { | ||
this.privateScan = privateScan; | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
src/main/java/com/checkmarx/jenkins/configascode/ScaConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package com.checkmarx.jenkins.configascode; | ||
|
||
import com.typesafe.config.Optional; | ||
|
||
public class ScaConfig { | ||
@Optional | ||
private String fileInclude; | ||
@Optional | ||
private String fileExclude; | ||
@Optional | ||
private String pathExclude; | ||
@Optional | ||
private int low; | ||
@Optional | ||
private int medium; | ||
@Optional | ||
private int high; | ||
|
||
public ScaConfig() { | ||
} | ||
|
||
public String getFileInclude() { | ||
return fileInclude; | ||
} | ||
|
||
public void setFileInclude(String fileInclude) { | ||
this.fileInclude = fileInclude; | ||
} | ||
|
||
public String getFileExclude() { | ||
return fileExclude; | ||
} | ||
|
||
public void setFileExclude(String fileExclude) { | ||
this.fileExclude = fileExclude; | ||
} | ||
|
||
public String getPathExclude() { | ||
return pathExclude; | ||
} | ||
|
||
public void setPathExclude(String pathExclude) { | ||
this.pathExclude = pathExclude; | ||
} | ||
|
||
public int getLow() { | ||
return low; | ||
} | ||
|
||
public void setLow(int low) { | ||
this.low = low; | ||
} | ||
|
||
public int getMedium() { | ||
return medium; | ||
} | ||
|
||
public void setMedium(int medium) { | ||
this.medium = medium; | ||
} | ||
|
||
public int getHigh() { | ||
return high; | ||
} | ||
|
||
public void setHigh(int high) { | ||
this.high = high; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...main/resources/com/checkmarx/jenkins/CxScanBuilder/help-addGlobalCommenToBuildCommet.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div> | ||
Allow sast comment to be added to the build comment.By default the global comment is empty | ||
</div> |