|
|
|
|
@ -79,6 +79,18 @@ public class CreateScanRequest {
|
|
|
|
|
|
|
|
|
|
// ConnectDB connectDB = new ConnectDB();
|
|
|
|
|
// Connection conn = connectDB.connect();
|
|
|
|
|
// try(Connection conn = connectDB.connect();
|
|
|
|
|
// PreparedStatement pstmt = conn.prepareStatement(gitObj.SQL)) {
|
|
|
|
|
// pstmt.setString(1, gitObj.getBuildSystemType());
|
|
|
|
|
// pstmt.setString(2, gitObj.getRepository());
|
|
|
|
|
// pstmt.setString(3, gitObj.getReference());
|
|
|
|
|
// pstmt.setString(4, gitObj.getCommitId());
|
|
|
|
|
// pstmt.executeUpdate();
|
|
|
|
|
// } catch (SQLException e){
|
|
|
|
|
// logger.error(e.getMessage());
|
|
|
|
|
// }
|
|
|
|
|
// tektonPipeline.invokeScanTask(gitObj)
|
|
|
|
|
|
|
|
|
|
// Statement stmt = null;
|
|
|
|
|
// String sql = "INSERT INTO gitscans (buildsystemtype, repository, reference, commitid) VALUES ('"+gitObj.buildSystemType+"','"+gitObj.repository+"','"+gitObj.reference+"','"+gitObj.commitId+"')";
|
|
|
|
|
// try{
|
|
|
|
|
@ -93,11 +105,22 @@ public class CreateScanRequest {
|
|
|
|
|
|
|
|
|
|
public void invokePncScanAnalyze(@Valid String scanInvocation)throws JSONException { |
|
|
|
|
throw new UnsupportedOperationException("unImplemented fucntionality"); |
|
|
|
|
|
|
|
|
|
// JSONObject jsonData = new JSONObject(scanInvocation);
|
|
|
|
|
// PncObj pncObj = PncObjPayload.constructScanPayload(jsonData);
|
|
|
|
|
|
|
|
|
|
// ConnectDB connectDB = new ConnectDB();
|
|
|
|
|
// Connection conn = connectDB.connect();
|
|
|
|
|
// try(Connection conn = connectDB.connect();
|
|
|
|
|
// PreparedStatement pstmt = conn.prepareStatement(pncObj.SQL)) {
|
|
|
|
|
// pstmt.setString(1, pncObj.getBuildSystemType());
|
|
|
|
|
// pstmt.setString(2, pncObj.getBuildId());
|
|
|
|
|
// pstmt.executeUpdate();
|
|
|
|
|
// } catch (SQLException e){
|
|
|
|
|
// logger.error(e.getMessage());
|
|
|
|
|
// }
|
|
|
|
|
// tektonPipeline.invokeScanTask(pncObj)
|
|
|
|
|
|
|
|
|
|
// Statement stmt = null;
|
|
|
|
|
// String sql = "INSERT INTO pncscans (buildsystemtype, buildid) VALUES ('"+pncObj.buildSystemType+"','"+pncObj.buildId+"')";
|
|
|
|
|
// try{
|
|
|
|
|
|