use of io.fabric8.kubernetes.api.builds.BuildListener in project fabric8 by fabric8io.
the class WatchBuilds method main.
public static void main(String... args) {
String namespace = null;
if (args.length > 0) {
namespace = args[0];
}
String consoleLink = Links.getFabric8ConsoleLink();
OpenShiftClient client = new DefaultOpenShiftClient();
BuildListener buildListener = new BuildListener() {
@Override
public void onBuildFinished(BuildFinishedEvent event) {
System.out.println("Build: " + event.getUid() + " for config: " + event.getConfigName() + " finished. Status: " + event.getStatus() + " link: " + event.getBuildLink());
}
};
BuildWatcher watcher = new BuildWatcher(client, buildListener, namespace, consoleLink);
long pollTime = 3000;
watcher.schedule(pollTime);
watcher.join();
}
Aggregations