Browse Source

Fix object reference comparison rather than comparison and change SA

name to what we hava available in the container
MinimisedMVP
Jonathan Christison 3 years ago
parent
commit
566baf015d
  1. 12
      src/main/java/rest/CreateScanRequest.java
  2. 2
      src/main/java/rest/TektonPipeline.java

12
src/main/java/rest/CreateScanRequest.java

@ -41,12 +41,12 @@ public class CreateScanRequest {
// in theory should take List<String> to clean it up
public void invokeScanAnalyze(@Valid String scanInvocation) throws JSONException {
JSONObject jsonData = new JSONObject(scanInvocation);
if(jsonData.getString("buildSystemType")=="brew"){
invokeBrewScanAnalyze(scanInvocation);
} else if(jsonData.getString("buildSystemType")=="pnc"){
invokeGitScanAnalyze(scanInvocation);
} else if(jsonData.getString("buildSystemType")=="git"){
invokePncScanAnalyze(scanInvocation);
if(jsonData.getString("buildSystemType").equals("brew")){
this.invokeBrewScanAnalyze(scanInvocation);
} else if(jsonData.getString("buildSystemType").equals("pnc")){
this.invokeGitScanAnalyze(scanInvocation);
} else if(jsonData.getString("buildSystemType").equals("git")){
this.invokePncScanAnalyze(scanInvocation);
}
}

2
src/main/java/rest/TektonPipeline.java

@ -23,7 +23,7 @@ public class TektonPipeline {
public static final String BUILD_ID = "buildId";
public static final String SCAN_PROFILE = "scanProfile";
public static final String TASK_REFERENCE = "osh-scan-task";
public static final String SERVICE_ACCOUNT = "osh-wrapper-client-sa";
public static final String SERVICE_ACCOUNT = "osh";
@Inject
TektonClient tektonClient;

Loading…
Cancel
Save