Package jetbrains.buildServer.tags
Interface TagsManager
-
- All Superinterfaces:
ServerExtension
,TeamCityExtension
public interface TagsManager extends ServerExtension
Processes tags on build instances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addTagDatas(BuildPromotion buildPromotion, java.util.Collection<TagData> tags)
Add tag set to the specified build promotion.void
clearTagDatas(BuildPromotion buildPromotion)
Remove all tags from the specified build promotion.java.util.List<Build>
findAll(java.lang.String tag)
Returns all finished builds marked with the specified public tag.java.util.List<Build>
findAll(java.lang.String tag, BuildType configuration)
Returns all finished builds marked with the specified public tag for the specified configuration.java.util.List<Build>
findAll(java.lang.String tag, User user)
Returns all finished builds marked with the specified private tag by provided userjava.util.List<BuildPromotion>
findAllPromotions(java.lang.String tag)
Returns all promotions marked with the specified public tag.java.util.List<BuildPromotion>
findAllPromotions(java.lang.String tag, BuildType configuration)
Returns all promotions marked with the specified public tag for the specified configuration.java.util.Set<TagData>
getAllTagDatas(BuildType buildType)
Returns all public and private tags assigned to configuration builds.java.util.List<java.lang.String>
getAllTags(Build build)
Returns all public tags assigned for the specified build.java.util.List<java.lang.String>
getAllTags(BuildType buildType)
Returns all public tags assigned to configuration builds.java.util.Collection<TagData>
getTagDatas(BuildPromotion build)
Returns all public and private tags assigned for the specified promotion.int
removeTagDatas(BuildPromotion buildPromotion, java.util.Collection<TagData> tags)
Remove particular tags from the specified build promotion.void
replacePublicTags(BuildPromotion buildPromotion, java.util.List<java.lang.String> tagLabels)
Replace existing public tags with public tags created from provided labelsvoid
setTagDatas(BuildPromotion buildPromotion, java.util.Collection<TagData> tags)
Change tag set to the specified build promotion, both public and privateTagData
All old tags related to the specified promotion will be removed, new tag set will be added.void
setTags(java.util.List<java.lang.String> tags, SBuild build)
Deprecated.void
setTags(User user, java.util.List<java.lang.String> tags, SBuild build)
Deprecated.
-
-
-
Method Detail
-
findAll
@NotNull java.util.List<Build> findAll(java.lang.String tag)
Returns all finished builds marked with the specified public tag.- Parameters:
tag
- specified tag.- Returns:
- all builds marked with the specified tag. Ordered by vcs revisions, most recent first.
-
findAll
@NotNull java.util.List<Build> findAll(java.lang.String tag, User user)
Returns all finished builds marked with the specified private tag by provided user- Parameters:
tag
- specified tag.user
- user.- Returns:
- all builds marked with the specified tag. Ordered by vcs revisions, most recent first.
-
findAll
@NotNull java.util.List<Build> findAll(java.lang.String tag, @NotNull BuildType configuration)
Returns all finished builds marked with the specified public tag for the specified configuration.- Parameters:
tag
- specified tag.configuration
- specified configuration.- Returns:
- all builds marked with the specified tag for the specified configuration. Ordered by vcs revisions, most recent first.
-
findAllPromotions
@NotNull java.util.List<BuildPromotion> findAllPromotions(java.lang.String tag)
Returns all promotions marked with the specified public tag. Resulting collection contains promotions for all builds (including personal) in any state (queued, running, finished, interrupted, cancelled)- Parameters:
tag
- specified tag.- Returns:
- all promotions marked with the specified tag. Ordered by vcs revisions, most recent first.
- Since:
- 9.0
-
findAllPromotions
@NotNull java.util.List<BuildPromotion> findAllPromotions(java.lang.String tag, @NotNull BuildType configuration)
Returns all promotions marked with the specified public tag for the specified configuration. Resulting collection contains promotions for all builds (including personal) in any state (queued, running, finished, interrupted, cancelled)- Parameters:
tag
- specified tag.configuration
- specified configuration.- Returns:
- all promotions marked with the specified tag for the specified configuration. Ordered by vcs revisions, most recent first.
- Since:
- 9.0
-
getAllTags
@NotNull java.util.List<java.lang.String> getAllTags(@NotNull Build build)
Returns all public tags assigned for the specified build.- Parameters:
build
- specified build instance.- Returns:
- all tags assigned for the specified build, ordered by name.
-
getTagDatas
@NotNull java.util.Collection<TagData> getTagDatas(@NotNull BuildPromotion build)
Returns all public and private tags assigned for the specified promotion. Uniqueness of labels is supported, any order is not applied.- Parameters:
build
- specified build instance.- Returns:
- all tags assigned for the specified promotion, ordered by name.
- Since:
- 9.0
-
setTags
@Deprecated void setTags(java.util.List<java.lang.String> tags, @NotNull SBuild build)
Deprecated.Changes public tag set for the specified build.- Parameters:
tags
- specified tag set.build
- specified build.
-
setTags
@Deprecated void setTags(User user, java.util.List<java.lang.String> tags, @NotNull SBuild build)
Deprecated.Changes public tag set for the specified build.- Parameters:
user
- user who set specified tags - the user who performs the action, not a owner for private tagstags
- specified public tag set.build
- specified build.- Since:
- 4.0.1
-
getAllTags
@NotNull java.util.List<java.lang.String> getAllTags(@NotNull BuildType buildType)
Returns all public tags assigned to configuration builds.- Parameters:
buildType
- specified configuration.- Returns:
- all tags assigned to configuration builds, ordered by name.
-
getAllTagDatas
@NotNull java.util.Set<TagData> getAllTagDatas(@NotNull BuildType buildType)
Returns all public and private tags assigned to configuration builds.- Parameters:
buildType
- specified configuration.- Returns:
- all tags assigned to configuration builds, ordered by name.
- Since:
- 9.0
-
setTagDatas
void setTagDatas(@NotNull BuildPromotion buildPromotion, @NotNull java.util.Collection<TagData> tags)
Change tag set to the specified build promotion, both public and privateTagData
All old tags related to the specified promotion will be removed, new tag set will be added.- Parameters:
buildPromotion
- build promotion to tagtags
- tags- Since:
- 9.0
-
addTagDatas
void addTagDatas(@NotNull BuildPromotion buildPromotion, @NotNull java.util.Collection<TagData> tags)
Add tag set to the specified build promotion. All old tags stay unchanged, both public and privateTagData
- Parameters:
buildPromotion
- build promotion to tagtags
- tags- Since:
- 9.0
-
removeTagDatas
int removeTagDatas(@NotNull BuildPromotion buildPromotion, @NotNull java.util.Collection<TagData> tags)
Remove particular tags from the specified build promotion.- Parameters:
buildPromotion
- build promotion to tagtags
- tags- Returns:
- count of tags that were removed, if some tags from tags set were not found no exception will be raised
- Since:
- 9.0
-
clearTagDatas
void clearTagDatas(@NotNull BuildPromotion buildPromotion)
Remove all tags from the specified build promotion.- Parameters:
buildPromotion
- build promotion to tag- Since:
- 9.0
-
replacePublicTags
void replacePublicTags(@NotNull BuildPromotion buildPromotion, @NotNull java.util.List<java.lang.String> tagLabels)
Replace existing public tags with public tags created from provided labels- Parameters:
buildPromotion
- build promotion to tagtagLabels
- tag labels- Since:
- 9.0
-
-