-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various fixes #23
Various fixes #23
Conversation
private synchronized void buildModified(Build build) { | ||
if ((build.getStatus().getPhase().equals(NEW) || build.getStatus().getPhase().equals(RUNNING)) && | ||
private static synchronized void buildModified(Build build) { | ||
if ((build.getStatus().getPhase().equals(NEW) || build.getStatus().getPhase().equals(PENDING) || build.getStatus().getPhase().equals(RUNNING)) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be cleaner to only get status once...before the and use later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -162,6 +164,10 @@ public static synchronized void buildAdded(Build build) throws IOException { | |||
return; | |||
} | |||
|
|||
if (!build.getStatus().getPhase().equals(NEW)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -270,6 +271,14 @@ public static void cancelOpenShiftBuild(Build build) { | |||
.done(); | |||
} | |||
|
|||
public static void updateOpenShiftBuildToPending(Build build) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can create a generic function that takes the Phase to set it to...PENDING, CANCELLED, etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
public static void cancelOpenShiftBuild(Build build) { | ||
logger.info("cancelling build in namespace " + build.getMetadata().getNamespace() + " with name: " + build.getMetadata().getName()); | ||
public static void updateOpenShiftBuildPhase(Build build, String phase) { | ||
logger.info("setting build to pending in namespace " + build.getMetadata().getNamespace() + " with name: " + build.getMetadata().getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should you be outputting the "phase" here instead of pending?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh thanks! Done.
Sorry for combining into one PR - just easier...
Includes: