in commit-status-publisher-server/src/main/java/jetbrains/buildServer/commitPublisher/CommitStatusPublisherListener.java [442:470]
public void buildRemovedFromQueue(@NotNull final SQueuedBuild build, final User user, final String comment) {
if (isQueueDisabled()) return;
if (build instanceof QueuedBuildEx && ((QueuedBuildEx) build).isStarted()) return;
if (shouldNotPublish(build.getBuildPromotion(), buildReason(build.getTriggeredBy()))) return;
if (isPublishingDisabled(build.getBuildPromotion())) {
LOG.info(String.format("Event: %s, build: %s: commit status publishing is disabled", Event.REMOVED_FROM_QUEUE, LogUtil.describe(build)));
return;
}
BuildPromotion promotion = build.getBuildPromotion();
// build removal is processed only for manually removed from queue or canceled/failed to start(due to failed dependency) builds
if (!promotion.isCanceled()) {
SBuild associatedBuild = promotion.getAssociatedBuild();
//check if build failed to start, if it's not then we shouldn't post status
if (associatedBuild == null || !associatedBuild.getBuildStatus().isFailed()) {
return;
}
}
if (!canNodeProcessRemovedFromQueue(promotion)) return;
if (((BuildPromotionEx)promotion).isChangeCollectingNeeded(false)) return;
runAsync(() -> {
proccessRemovedFromQueueBuild(build, user, comment);
}, null);
}