public class BuildServerAdapter extends ProjectsModelListenerAdapter implements BuildServerListener
BuildServerListeners.| Constructor and Description |
|---|
BuildServerAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
agentDescriptionUpdated(SBuildAgent agent)
Called when build agent description update is finished.
|
void |
agentRegistered(SBuildAgent agent,
long currentlyRunningBuildId)
Called when build agent is registered (connected)
Some events may be skipped when an agent was registered on another node. |
void |
agentRemoved(SBuildAgent agent)
Called when agent was completely removed from server storage.
|
void |
agentStatusChanged(SBuildAgent agent,
boolean wasEnabled,
boolean wasAuthorized)
Called when the status of an agent is changed by a user
Some events may be skipped when an agent is registered on another node. |
void |
agentUnregistered(SBuildAgent agent)
Called after build agent unregistration
Some events may be skipped when an agent was registered on another node. |
void |
beforeAgentUnregistered(SBuildAgent agent)
Called before build agent unregistration
Some events may be skipped when an agent was registered on another node. |
void |
beforeBuildFinish(SRunningBuild runningBuild)
Called right before build finishing, allows to write additional messages to the build log,
update build status.
|
void |
beforeEntryDelete(SFinishedBuild entry)
Called before deletion of the build history entry
|
void |
buildArtifactsChanged(SBuild build)
Called when build artifacts are changed by the server on disk, for example, when cleanup removed some files.
|
void |
buildChangedStatus(SRunningBuild build,
Status oldStatus,
Status newStatus)
Called when build status changes from successful to failed
|
void |
buildCommented(SBuild build,
User user,
java.lang.String comment)
Called when user comment the build.
|
void |
buildFinished(SRunningBuild build)
Called after build finishing, only if build was not interrupted
|
void |
buildInterrupted(SRunningBuild build)
Called after build finishing, only if build was interrupted
|
void |
buildPinned(SBuild build,
User user,
java.lang.String comment)
Called when user pinned the build.
|
void |
buildProblemsChanged(SBuild build,
java.util.List<BuildProblemData> before,
java.util.List<BuildProblemData> after)
Called when list of build problems changes (problems added, removed)
before parameter may be empty or contain some outdated data when the problems are changed on another node:
current node is main server but the problem was added on messages processing node
current node is read-only but the problem was added on the main server
|
void |
buildProblemsMuted(MuteInfo muteInfo)
Called when a set of build problems are muted (with same mute properties).
|
void |
buildProblemsUnmuted(SUser user,
java.util.Map<MuteInfo,java.util.Collection<BuildProblemInfo>> unmutedGroups)
Called when a set of build problems are unmuted.
|
void |
buildPromotionTagsChanged(BuildPromotion buildPromotion,
User user,
java.util.Collection<TagData> oldTags,
java.util.Collection<TagData> newTags)
Called when build promotion tags have been set to specified values
Some parameters may be omitted when the tags were changed on another node (i.e. |
void |
buildQueueOrderChanged()
Called when user reordered build queue order.
|
void |
buildRemovedFromQueue(SQueuedBuild queued,
User user,
java.lang.String comment)
Called when a build is removed from the build queue (started, deleted, optimized, etc.)
Some events may be missing when the current node is not responsible for managing build queue.
|
void |
buildStarted(SRunningBuild build)
Called when build is about to start.
|
void |
buildTagsChanged(SBuild build,
java.util.List<java.lang.String> oldTags,
java.util.List<java.lang.String> newTags)
Deprecated.
|
void |
buildTagsChanged(SBuild build,
User user,
java.util.List<java.lang.String> oldTags,
java.util.List<java.lang.String> newTags)
Deprecated.
|
void |
buildTypeAddedToQueue(SBuildType buildType)
Deprecated.
|
void |
buildTypeAddedToQueue(SQueuedBuild queuedBuild)
Called when build configuration was added to build queue
Some events may be missing when the current node is not responsible for managing build queue.
|
void |
buildUnpinned(SBuild build,
User user,
java.lang.String comment)
Called when user unpinned the build.
|
void |
changeAdded(VcsModification modification,
VcsRoot root,
java.util.Collection<SBuildType> buildTypes)
Called when a new modification (user commit) was detected.
|
void |
changesLoaded(SRunningBuild build)
Called when changes for a newly started build has been loaded
|
void |
cleanupFinished()
Called when database cleanup has been finished.
|
void |
cleanupStarted()
Called when database cleanup is going to start.
|
void |
entriesDeleted(java.util.Collection<SFinishedBuild> removedEntries)
Called after deletion of a set of build history entries
Only one of
BuildServerListener.entryDeleted(SFinishedBuild) or this method should be overriden in a listener. |
void |
entryCreated(SFinishedBuild build)
Called when build is added to the history.
|
void |
entryDeleted(SFinishedBuild entry)
Called after deletion of a build history entry.
|
void |
labelingFailed(SBuild build,
VcsRoot root,
java.lang.Throwable exception)
Labeling process failed for the specified build and root with the specified problem.
|
void |
labelingSucceed(SBuild build,
BuildRevision revision)
Labeling process succeed for the specified build and revision
|
void |
messageReceived(SRunningBuild build,
BuildMessage1 message)
Deprecated.
|
void |
pluginsLoaded()
Called when all server plugins are loaded, but before
ServerListener.serverStartup() event. |
void |
responsibleChanged(SBuildType bt,
ResponsibilityEntry oldValue,
ResponsibilityEntry newValue)
Called when build configuration responsible has changed, or responsibility status has changed
Some events may be omitted when the responsibility was changed on another node, i.e. |
void |
responsibleChanged(SProject project,
java.util.Collection<BuildProblemInfo> buildProblems,
ResponsibilityEntry entry)
Called when responsibility for several build problems at once is changed.
|
void |
responsibleChanged(SProject project,
java.util.Collection<TestName> testNames,
ResponsibilityEntry entry,
boolean isUserAction)
Called when responsibility for several tests at once is changed.
|
void |
responsibleChanged(SProject project,
TestNameResponsibilityEntry oldValue,
TestNameResponsibilityEntry newValue,
boolean isUserAction)
Deprecated.
|
void |
responsibleRemoved(SProject project,
TestNameResponsibilityEntry entry)
Called when responsibility for several tests at once is changed.
|
void |
serverConfigurationReloaded()
Called when the main server configuration file is reloaded
|
void |
serverShutdown()
Called when server shutdown has been started
|
void |
serverShutdownComplete()
Event called after server shutdown complete.
|
void |
serverStartup()
Called when server has been started and its configuration has been loaded from the disk
|
void |
sourcesVersionReleased(BuildAgent agent)
Clean sources performed for the given agent
|
void |
sourcesVersionReleased(BuildType configuration)
Clean sources performed for the given configuration on all agents
|
void |
sourcesVersionReleased(BuildType configuration,
BuildAgent agent)
Clean sources performed for the given configuration on the given agent
|
void |
statisticValuePublished(SBuild build,
java.lang.String valueTypeKey,
java.math.BigDecimal value)
Called upon statistic-value related to the given build have been published
|
void |
testsMuted(MuteInfo muteInfo)
Called when a set of tests are muted (with same mute properties).
|
void |
testsUnmuted(SUser user,
java.util.Map<MuteInfo,java.util.Collection<STest>> unmutedGroups)
Called when several of tests have been unmuted.
|
beforeBuildTypeDeleted, buildTypeActiveStatusChanged, buildTypeDeleted, buildTypeExternalIdChanged, buildTypeMoved, buildTypePersisted, buildTypeRegistered, buildTypeTemplateDeleted, buildTypeTemplateDeleted, buildTypeTemplateExternalIdChanged, buildTypeTemplatePersisted, buildTypeTemplateRestored, buildTypeUnregistered, projectArchived, projectCreated, projectDearchived, projectExternalIdChanged, projectFeatureAdded, projectFeatureChanged, projectFeatureRemoved, projectMoved, projectPersisted, projectRemoved, projectRemoved, projectRestored, vcsRootExternalIdChanged, vcsRootPersisted, vcsRootRemoved, vcsRootsPersisted, vcsRootUpdatedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbeforeBuildTypeDeleted, buildTypeActiveStatusChanged, buildTypeDeleted, buildTypeExternalIdChanged, buildTypeMoved, buildTypePersisted, buildTypeRegistered, buildTypeTemplateDeleted, buildTypeTemplateDeleted, buildTypeTemplateExternalIdChanged, buildTypeTemplatePersisted, buildTypeTemplateRestored, buildTypeUnregistered, projectArchived, projectCreated, projectDearchived, projectExternalIdChanged, projectFeatureAdded, projectFeatureChanged, projectFeatureRemoved, projectMoved, projectPersisted, projectRemoved, projectRemoved, projectRestored, vcsRootExternalIdChanged, vcsRootPersisted, vcsRootRemoved, vcsRootsPersisted, vcsRootUpdatedpublic void agentRegistered(@NotNull
SBuildAgent agent,
long currentlyRunningBuildId)
BuildServerListeneragentRegistered in interface BuildServerListeneragent - which was registeredcurrentlyRunningBuildId - id of the build which is running on this build agent, -1 if no build is running on agentpublic void agentDescriptionUpdated(@NotNull
SBuildAgent agent)
BuildServerListeneragentDescriptionUpdated in interface BuildServerListeneragent - agent with updated agent descriptionpublic void agentUnregistered(@NotNull
SBuildAgent agent)
BuildServerListeneragentUnregistered in interface BuildServerListeneragent - which was unregisteredpublic void beforeAgentUnregistered(@NotNull
SBuildAgent agent)
BuildServerListenerbeforeAgentUnregistered in interface BuildServerListeneragent - which is about to unregisterpublic void agentRemoved(@NotNull
SBuildAgent agent)
BuildServerListeneragentRemoved in interface BuildServerListeneragent - removed agent@Deprecated
public void buildTypeAddedToQueue(@NotNull
SBuildType buildType)
BuildServerListenerbuildTypeAddedToQueue in interface BuildServerListenerbuildType - build configuration added to build queuepublic void buildTypeAddedToQueue(@NotNull
SQueuedBuild queuedBuild)
BuildServerListenerbuildTypeAddedToQueue in interface BuildServerListenerqueuedBuild - queued build added to the queuepublic void buildRemovedFromQueue(@NotNull
SQueuedBuild queued,
User user,
java.lang.String comment)
BuildServerListenerbuildRemovedFromQueue in interface BuildServerListenerqueued - queued build removed from the queueuser - if build was removed manually, contains the user who removed build configuration from queuecomment - provided by user when removing build from queuepublic void buildPinned(@NotNull
SBuild build,
@Nullable
User user,
@Nullable
java.lang.String comment)
BuildServerListeneruser and comment parameters are omitted (nulls) when the build was pinned on another node (i.e. it's not called on read-only node)buildPinned in interface BuildServerListenerbuild - pinned builduser - the user who pinned the buildcomment - comment provided by user when pinning buildpublic void buildUnpinned(@NotNull
SBuild build,
@Nullable
User user,
@Nullable
java.lang.String comment)
BuildServerListeneruser and comment parameters are omitted (nulls) when the build was unpinned on another node (i.e. it's not called on read-only node)buildUnpinned in interface BuildServerListenerbuild - unpinned builduser - the user who unpinned the buildcomment - comment provided by user when unpinning buildpublic void buildQueueOrderChanged()
BuildServerListenerbuildQueueOrderChanged in interface BuildServerListenerpublic void buildStarted(@NotNull
SRunningBuild build)
BuildServerListenerbuildStarted in interface BuildServerListenerbuild - build configuration whose status has changedpublic void changesLoaded(@NotNull
SRunningBuild build)
BuildServerListenerchangesLoaded in interface BuildServerListenerbuild - build, whose changes are loadedpublic void buildChangedStatus(@NotNull
SRunningBuild build,
Status oldStatus,
Status newStatus)
BuildServerListenerbuildChangedStatus in interface BuildServerListenerbuild - corresponding running buildoldStatus - previous statusnewStatus - new statuspublic void buildFinished(@NotNull
SRunningBuild build)
BuildServerListenerbuildFinished in interface BuildServerListenerbuild - running build
// TODO: shall pass SFinishedBuild as parameterpublic void beforeBuildFinish(@NotNull
SRunningBuild runningBuild)
BuildServerListenerbeforeBuildFinish in interface BuildServerListenerrunningBuild - corresponding running build@Deprecated
public void messageReceived(@NotNull
SRunningBuild build,
@NotNull
BuildMessage1 message)
BuildServerListenermessageReceived in interface BuildServerListenerbuild - running buildmessage - message sent to the buildpublic void responsibleChanged(@NotNull
SBuildType bt,
@NotNull
ResponsibilityEntry oldValue,
@NotNull
ResponsibilityEntry newValue)
BuildServerListenerresponsibleChanged in interface BuildServerListenerbt - build configurationoldValue - previous responsibility entrynewValue - new responsibility entry@Deprecated
public void responsibleChanged(@NotNull
SProject project,
@Nullable
TestNameResponsibilityEntry oldValue,
@NotNull
TestNameResponsibilityEntry newValue,
boolean isUserAction)
BuildServerListenerresponsibleChanged in interface BuildServerListenerproject - the project in which test responsibility has changedoldValue - old responsibility entrynewValue - new responsibility entryisUserAction - true if responsibility status was changed manually via Web UIpublic void responsibleChanged(@NotNull
SProject project,
@NotNull
java.util.Collection<TestName> testNames,
@NotNull
ResponsibilityEntry entry,
boolean isUserAction)
BuildServerListenerresponsibleChanged in interface BuildServerListenerproject - the projecttestNames - test namesentry - the new responsibility entry for each testisUserAction - true if responsibility status was changed manually via Web UIpublic void responsibleRemoved(@NotNull
SProject project,
@NotNull
TestNameResponsibilityEntry entry)
BuildServerListenerresponsibleRemoved in interface BuildServerListenerproject - the projectentry - the new responsibility entry for each testpublic void responsibleChanged(@NotNull
SProject project,
@NotNull
java.util.Collection<BuildProblemInfo> buildProblems,
@Nullable
ResponsibilityEntry entry)
BuildServerListenerresponsibleChanged in interface BuildServerListenerproject - the projectbuildProblems - build problemsentry - the new responsibility entry or null if responsibility is removedpublic void beforeEntryDelete(@NotNull
SFinishedBuild entry)
BuildServerListenerbeforeEntryDelete in interface BuildServerListenerentry - build to be deletedpublic void entryDeleted(@NotNull
SFinishedBuild entry)
BuildServerListenerBuildServerListener.entriesDeleted(java.util.Collection).
Only this method or BuildServerListener.entriesDeleted(java.util.Collection) should be overriden in a listener.entryDeleted in interface BuildServerListenerentry - deleted buildBuildServerListener.entriesDeleted(java.util.Collection)public void entriesDeleted(@NotNull
java.util.Collection<SFinishedBuild> removedEntries)
BuildServerListenerBuildServerListener.entryDeleted(SFinishedBuild) or this method should be overriden in a listener.entriesDeleted in interface BuildServerListenerremovedEntries - deleted buildspublic void entryCreated(@NotNull
SFinishedBuild build)
BuildServerListenerentryCreated in interface BuildServerListenerpublic void serverShutdown()
ServerListenerserverShutdown in interface ServerListenerpublic void serverStartup()
ServerListenerserverStartup in interface ServerListenerpublic void pluginsLoaded()
BuildServerListenerServerListener.serverStartup() event.pluginsLoaded in interface BuildServerListenerpublic void buildInterrupted(@NotNull
SRunningBuild build)
BuildServerListenerbuildInterrupted in interface BuildServerListenerbuild - running build
// TODO: shall pass SFinishedBuild as parameterpublic void changeAdded(@NotNull
VcsModification modification,
@NotNull
VcsRoot root,
@Nullable
java.util.Collection<SBuildType> buildTypes)
BuildServerListenerchangeAdded in interface BuildServerListenermodification - detected VCS modificationroot - VCS root where modification was detectedbuildTypes - if changes were detected when a build starts collection of buildTypes where changes collection was performedpublic void agentStatusChanged(@NotNull
SBuildAgent agent,
boolean wasEnabled,
boolean wasAuthorized)
BuildServerListeneragentStatusChanged in interface BuildServerListeneragent - the agentwasEnabled - the previous statuswasAuthorized - previous authorized statepublic void cleanupStarted()
BuildServerListenercleanupStarted in interface BuildServerListenerpublic void cleanupFinished()
BuildServerListenercleanupFinished in interface BuildServerListenerpublic void serverShutdownComplete()
BuildServerListenerserverShutdownComplete in interface BuildServerListenerpublic void sourcesVersionReleased(@NotNull
BuildAgent agent)
BuildServerListenersourcesVersionReleased in interface BuildServerListeneragent - build agent whose sources are about to clean
todo: change to S-interfacespublic void sourcesVersionReleased(@NotNull
BuildType configuration)
BuildServerListenersourcesVersionReleased in interface BuildServerListenerconfiguration - build configuration, whose sources to clean
todo: change to S-interfacespublic void sourcesVersionReleased(@NotNull
BuildType configuration,
@NotNull
BuildAgent agent)
BuildServerListenersourcesVersionReleased in interface BuildServerListenerconfiguration - build configuration, whose sources to cleanagent - agent where to clean sources
todo: change to S-interfacespublic void labelingFailed(@NotNull
SBuild build,
@NotNull
VcsRoot root,
@NotNull
java.lang.Throwable exception)
BuildServerListenerlabelingFailed in interface BuildServerListenerbuild - build for which labeling failed.root - root for which labeling failed.exception - labeling cause.public void labelingSucceed(@NotNull
SBuild build,
@NotNull
BuildRevision revision)
BuildServerListenerlabelingSucceed in interface BuildServerListenerbuild - build for which labeling failed.revision - labeled.@Deprecated
public void buildTagsChanged(@NotNull
SBuild build,
@NotNull
java.util.List<java.lang.String> oldTags,
@NotNull
java.util.List<java.lang.String> newTags)
BuildServerListenerbuildTagsChanged in interface BuildServerListenerbuild - corresponding build, which tags have been setoldTags - previous tags on the buildnewTags - new tags on the build@Deprecated
public void buildTagsChanged(@NotNull
SBuild build,
User user,
@NotNull
java.util.List<java.lang.String> oldTags,
@NotNull
java.util.List<java.lang.String> newTags)
BuildServerListenerbuildTagsChanged in interface BuildServerListenerbuild - corresponding build, which tags have been setuser - user who set new tagsoldTags - previous tags on the buildnewTags - new tags on the buildpublic void buildPromotionTagsChanged(@NotNull
BuildPromotion buildPromotion,
@Nullable
User user,
@NotNull
java.util.Collection<TagData> oldTags,
@NotNull
java.util.Collection<TagData> newTags)
BuildServerListeneruser is null, oldTags are empty.buildPromotionTagsChanged in interface BuildServerListenerbuildPromotion - corresponding build promotion, which tags have been setuser - user who set new tagsoldTags - previous tags on the build promotion (public and private)newTags - new tags on the build promotion (public and private)public void buildCommented(@NotNull
SBuild build,
@Nullable
User user,
@Nullable
java.lang.String comment)
BuildServerListeneruser and comment parameters are omitted (nulls) when the build was commented on another node (i.e. when the event is called on read-only node).buildCommented in interface BuildServerListenerbuild - commented builduser - the user who commented the buildcomment - comment provided by userpublic void serverConfigurationReloaded()
BuildServerListenerserverConfigurationReloaded in interface BuildServerListenerpublic void testsMuted(@NotNull
MuteInfo muteInfo)
BuildServerListenertestsMuted in interface BuildServerListenermuteInfo - mute infopublic void testsUnmuted(@Nullable
SUser user,
@NotNull
java.util.Map<MuteInfo,java.util.Collection<STest>> unmutedGroups)
BuildServerListenertestsUnmuted in interface BuildServerListeneruser - user that unmuted tests, or null if they were unmuted automatically.unmutedGroups - groups of tests that were unmuted.public void buildProblemsChanged(@NotNull
SBuild build,
@NotNull
java.util.List<BuildProblemData> before,
@NotNull
java.util.List<BuildProblemData> after)
BuildServerListenerbefore parameter may be empty or contain some outdated data when the problems are changed on another node:
buildProblemsChanged in interface BuildServerListenerbuild - corresponding buildbefore - list of build problems before changeafter - list of build problems after changepublic void statisticValuePublished(@NotNull
SBuild build,
@NotNull
java.lang.String valueTypeKey,
@NotNull
java.math.BigDecimal value)
BuildServerListenerstatisticValuePublished in interface BuildServerListenerbuild - build this particular value pertains tovalueTypeKey - target statistic-value's type-keyvalue - target build-valuepublic void buildProblemsMuted(@NotNull
MuteInfo muteInfo)
BuildServerListenerbuildProblemsMuted in interface BuildServerListenermuteInfo - mute infopublic void buildProblemsUnmuted(@Nullable
SUser user,
@NotNull
java.util.Map<MuteInfo,java.util.Collection<BuildProblemInfo>> unmutedGroups)
BuildServerListenerbuildProblemsUnmuted in interface BuildServerListeneruser - user that unmuted problems, or null if they were unmuted automatically.unmutedGroups - groups of build problems that were unmuted.public void buildArtifactsChanged(@NotNull
SBuild build)
BuildServerListenerbuildArtifactsChanged in interface BuildServerListenerbuild - build whose artifacts were changed