You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1022 B
41 lines
1022 B
package com.redhat.pctsec.model; |
|
|
|
import com.redhat.pctsec.tekton.brewTaskRun; |
|
import com.redhat.pctsec.tekton.scmUrlPipelineRun; |
|
import jakarta.enterprise.context.ApplicationScoped; |
|
import jakarta.inject.Inject; |
|
import jakarta.inject.Singleton; |
|
|
|
import java.util.HashMap; |
|
@ApplicationScoped |
|
public class Scan { |
|
|
|
private HashMap<String, String> metadata; |
|
private HashMap<String, String> oshScanOptions; |
|
private String brewBuild; |
|
private HashMap<String, String> scmurl; |
|
|
|
@Inject |
|
brewTaskRun btr; |
|
|
|
@Inject |
|
scmUrlPipelineRun plr; |
|
|
|
public Scan(String brewBuildId) |
|
{ |
|
this.brewBuild = brewBuildId; |
|
} |
|
|
|
public Scan(String repo, String ref) |
|
{ |
|
this.scmurl = new HashMap<>(); |
|
this.scmurl.put("repo", repo); |
|
this.scmurl.put("ref", repo); |
|
} |
|
public void executeScan(){ |
|
if(this.brewBuild != null && !this.brewBuild.trim().isEmpty()){ |
|
btr = new brewTaskRun(); |
|
btr.invokeScanTask(this.brewBuild); |
|
} |
|
} |
|
}
|
|
|