use of io.fabric8.openshift.api.model.WebHookTrigger in project fabric8 by fabric8io.
the class TriggerBuild method main.
public static void main(String... args) {
if (args.length < 1) {
System.out.println("Usage: buildConfigName namespace secret type");
return;
}
String name = args[0];
String namespace = "default";
if (args.length > 1) {
namespace = args[1];
}
OpenShiftClient client = new DefaultOpenShiftClient();
try {
client.buildConfigs().inNamespace(namespace).withName(name).trigger(new WebHookTrigger(true, null));
} catch (Exception e) {
System.out.println("FAILED: " + e);
e.printStackTrace();
}
}
Aggregations