Search in sources :

Example 1 with VcsRootInstanceEntry

use of jetbrains.buildServer.vcs.VcsRootInstanceEntry in project teamcity-rest by JetBrains.

the class BuildRequest method setVcsLabel.

/**
 * Adds a label to build VCS roots.
 * @param buildLocator   specifies build to label.
 * @param vcsRootLocator optional, specifies a VCS root to put a label on. If not present, label will be applied to all VCS roots.
 * @param fields         specifies result representation
 * @param labelValue     text of the label.
 * @return added labels.
 */
@POST
@Path("/{buildLocator}/vcsLabels")
@Consumes("text/plain")
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Add a VCS label to the matching build.", nickname = "addBuildVcsLabel")
public VcsLabels setVcsLabel(@ApiParam(format = LocatorName.BUILD) @PathParam("buildLocator") String buildLocator, @ApiParam(format = LocatorName.VCS_ROOT_INSTANCE) @QueryParam("locator") String vcsRootLocator, @QueryParam("fields") String fields, String labelValue) {
    if (StringUtil.isEmpty(labelValue)) {
        throw new BadRequestException("Label can not empty.");
    }
    SBuild build = getBuild(myBuildFinder.getBuildPromotion(null, buildLocator));
    if (build == null) {
        throw new NotFoundException("Cannot find a build using locator: " + buildLocator);
    }
    VcsLabelManager labelManager = myBeanContext.getSingletonService(VcsLabelManager.class);
    List<VcsRootInstance> roots;
    if (vcsRootLocator == null) {
        roots = build.getVcsRootEntries().stream().map(VcsRootInstanceEntry::getVcsRoot).collect(Collectors.toList());
    } else {
        VcsRootInstanceFinder rootInstanceFinder = myBeanContext.getSingletonService(VcsRootInstanceFinder.class);
        roots = Collections.singletonList(rootInstanceFinder.getItem(vcsRootLocator));
    }
    try {
        labelManager.setLabel(build, labelValue, roots);
    } catch (VcsException e) {
        LOG.warn("Couldn't set a vcs label.", e);
    }
    Fields returnFields = new Fields(fields);
    return new VcsLabels(labelManager.getLabels(build).stream().filter(l -> l.getLabelText().equals(labelValue)).map(l -> new VcsLabel(l, returnFields, myBeanContext)).collect(Collectors.toList()), returnFields);
}
Also used : BuildProblem(jetbrains.buildServer.serverSide.problems.BuildProblem) Loggers(jetbrains.buildServer.log.Loggers) EncryptUtil(jetbrains.buildServer.serverSide.crypt.EncryptUtil) TCStreamUtil(jetbrains.buildServer.util.TCStreamUtil) ApiParam(io.swagger.annotations.ApiParam) jetbrains.buildServer.server.rest.errors(jetbrains.buildServer.server.rest.errors) jetbrains.buildServer.server.rest.data(jetbrains.buildServer.server.rest.data) HttpDownloadProcessor(jetbrains.buildServer.controllers.HttpDownloadProcessor) TimeService(jetbrains.buildServer.util.TimeService) jetbrains.buildServer.serverSide.auth(jetbrains.buildServer.serverSide.auth) ApiOperation(io.swagger.annotations.ApiOperation) FileUtil(jetbrains.buildServer.util.FileUtil) jetbrains.buildServer.server.rest.model.build(jetbrains.buildServer.server.rest.model.build) VcsRootInstanceEntry(jetbrains.buildServer.vcs.VcsRootInstanceEntry) TestOccurrenceFinder(jetbrains.buildServer.server.rest.data.problem.TestOccurrenceFinder) ChangeBuildStatusProcessor(jetbrains.buildServer.controllers.actions.ChangeBuildStatusProcessor) StringUtil(jetbrains.buildServer.util.StringUtil) LogUtil(jetbrains.buildServer.serverSide.impl.LogUtil) Logger(com.intellij.openapi.diagnostic.Logger) RunningBuildState(jetbrains.buildServer.serverSide.impl.RunningBuildState) BaseBuild(jetbrains.buildServer.serverSide.impl.BaseBuild) UserModel(jetbrains.buildServer.users.UserModel) jetbrains.buildServer.serverSide(jetbrains.buildServer.serverSide) ServerProvidedProperties(jetbrains.buildServer.agent.ServerProvidedProperties) ProcessingResult(jetbrains.buildServer.parameters.ProcessingResult) TagFinder(jetbrains.buildServer.server.rest.data.build.TagFinder) SessionUser(jetbrains.buildServer.web.util.SessionUser) Collectors(java.util.stream.Collectors) DefaultMessagesInfo(jetbrains.buildServer.messages.DefaultMessagesInfo) ProblemOccurrenceFinder(jetbrains.buildServer.server.rest.data.problem.ProblemOccurrenceFinder) Nullable(org.jetbrains.annotations.Nullable) TestOccurrences(jetbrains.buildServer.server.rest.model.problem.TestOccurrences) javax.ws.rs(javax.ws.rs) VcsException(jetbrains.buildServer.vcs.VcsException) Pattern(java.util.regex.Pattern) BeanContext(jetbrains.buildServer.server.rest.util.BeanContext) NotNull(org.jetbrains.annotations.NotNull) VcsManager(jetbrains.buildServer.vcs.VcsManager) WebUtil(jetbrains.buildServer.web.util.WebUtil) java.util(java.util) LocatorName(jetbrains.buildServer.server.rest.swagger.constants.LocatorName) TriggeredBy(jetbrains.buildServer.serverSide.TriggeredBy) Status(jetbrains.buildServer.messages.Status) IssueUsages(jetbrains.buildServer.server.rest.model.issue.IssueUsages) jetbrains.buildServer.server.rest.model(jetbrains.buildServer.server.rest.model) Element(jetbrains.buildServer.util.browser.Element) HttpServletRequest(javax.servlet.http.HttpServletRequest) ParametersPersistableEntity(jetbrains.buildServer.server.rest.data.parameters.ParametersPersistableEntity) BuildProblemData(jetbrains.buildServer.BuildProblemData) TagsManager(jetbrains.buildServer.tags.TagsManager) Api(io.swagger.annotations.Api) SecurityContext(jetbrains.buildServer.serverSide.auth.SecurityContext) VcsRootInstance(jetbrains.buildServer.vcs.VcsRootInstance) ProblemOccurrences(jetbrains.buildServer.server.rest.model.problem.ProblemOccurrences) BuildChanges(jetbrains.buildServer.server.rest.model.change.BuildChanges) Properties(jetbrains.buildServer.server.rest.model.Properties) BuildTypeUtil(jetbrains.buildServer.server.rest.model.buildType.BuildTypeUtil) BuildAgentMessagesQueue(jetbrains.buildServer.serverSide.impl.BuildAgentMessagesQueue) HttpServletResponse(javax.servlet.http.HttpServletResponse) javax.ws.rs.core(javax.ws.rs.core) ServerAuthUtil(jetbrains.buildServer.serverSide.impl.auth.ServerAuthUtil) Consumer(java.util.function.Consumer) ProblemOccurrence(jetbrains.buildServer.server.rest.model.problem.ProblemOccurrence) java.io(java.io) VcsLabelManager(jetbrains.buildServer.serverSide.vcs.VcsLabelManager) FileSecurityUtil(jetbrains.buildServer.controllers.FileSecurityUtil) ActionErrors(jetbrains.buildServer.controllers.ActionErrors) WebAuthUtil(jetbrains.buildServer.web.util.WebAuthUtil) ServletContext(javax.servlet.ServletContext) QueuedBuild(jetbrains.buildServer.QueuedBuild) SUser(jetbrains.buildServer.users.SUser) ReferencesResolverUtil(jetbrains.buildServer.parameters.ReferencesResolverUtil) AggregatedBuildArtifactsElementBuilder(jetbrains.buildServer.server.rest.util.AggregatedBuildArtifactsElementBuilder) User(jetbrains.buildServer.users.User) VcsLabelManager(jetbrains.buildServer.serverSide.vcs.VcsLabelManager) VcsRootInstanceEntry(jetbrains.buildServer.vcs.VcsRootInstanceEntry) VcsRootInstance(jetbrains.buildServer.vcs.VcsRootInstance) VcsException(jetbrains.buildServer.vcs.VcsException) ApiOperation(io.swagger.annotations.ApiOperation)

Example 2 with VcsRootInstanceEntry

use of jetbrains.buildServer.vcs.VcsRootInstanceEntry in project teamcity-rest by JetBrains.

the class BuildTypeFinder method getFilter.

@NotNull
@Override
public ItemFilter<BuildTypeOrTemplate> getFilter(@NotNull final Locator locator) {
    final MultiCheckerFilter<BuildTypeOrTemplate> result = new MultiCheckerFilter<BuildTypeOrTemplate>();
    if (locator.isUnused(DIMENSION_ID)) {
        final String id = locator.getSingleDimensionValue(DIMENSION_ID);
        if (id != null) {
            result.add(item -> id.equals(item.getId()));
        }
    }
    if (locator.isUnused(DIMENSION_INTERNAL_ID)) {
        final String internalId = locator.getSingleDimensionValue(DIMENSION_INTERNAL_ID);
        if (internalId != null) {
            result.add(item -> internalId.equals(item.getInternalId()));
        }
    }
    if (locator.isUnused(DIMENSION_UUID)) {
        final String uuid = locator.getSingleDimensionValue(DIMENSION_UUID);
        if (uuid != null) {
            result.add(item -> uuid.equals(((BuildTypeIdentityEx) item.getIdentity()).getEntityId().getConfigId()));
        }
    }
    final String name = locator.getSingleDimensionValue(DIMENSION_NAME);
    if (name != null) {
        result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

            public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                return name.equalsIgnoreCase(item.getName());
            }
        });
    }
    if (locator.isUnused(DIMENSION_PROJECT)) {
        final String projectLocator = locator.getSingleDimensionValue(DIMENSION_PROJECT);
        if (projectLocator != null) {
            final List<SProject> projects = myProjectFinder.getItems(projectLocator).myEntries;
            if (projects.size() == 1) {
                final SProject internalProject = projects.iterator().next();
                result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

                    public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                        return internalProject.getProjectId().equals(item.getProject().getProjectId());
                    }
                });
            } else {
                result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

                    public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                        return projects.contains(item.getProject());
                    }
                });
            }
        }
    }
    final String affectedProjectDimension = locator.getSingleDimensionValue(AFFECTED_PROJECT);
    if (affectedProjectDimension != null) {
        @NotNull final SProject parentProject = myProjectFinder.getItem(affectedProjectDimension);
        result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

            public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                return ProjectFinder.isSameOrParent(parentProject, item.getProject());
            }
        });
    }
    final Boolean paused = locator.getSingleDimensionValueAsBoolean(PAUSED);
    if (paused != null) {
        result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

            public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                final Boolean pausedState = item.isPaused();
                return FilterUtil.isIncludedByBooleanFilter(paused, pausedState != null && pausedState);
            }
        });
    }
    if (locator.isUnused(BUILD)) {
        String buildLocator = locator.getSingleDimensionValue(BUILD);
        if (buildLocator != null) {
            List<BuildPromotion> builds = myServiceLocator.getSingletonService(BuildPromotionFinder.class).getItems(buildLocator).myEntries;
            Set<String> buldTypeIds = builds.stream().map(build -> build.getBuildType()).filter(Objects::nonNull).map(buildType -> buildType.getInternalId()).collect(Collectors.toSet());
            result.add(item -> buldTypeIds.contains(item.getInternalId()));
        }
    }
    // experimental
    final String compatibleAagentLocator = locator.getSingleDimensionValue(COMPATIBLE_AGENT);
    if (compatibleAagentLocator != null) {
        final List<SBuildAgent> agents = myAgentFinder.getItems(compatibleAagentLocator).myEntries;
        result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

            public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                if (item.getBuildType() == null)
                    return false;
                for (SBuildAgent agent : agents) {
                    if (AgentFinder.canActuallyRun(agent, item.getBuildType()))
                        return true;
                }
                return false;
            }
        });
    }
    // experimental
    final Long compatibleAgentsCount = locator.getSingleDimensionValueAsLong(COMPATIBLE_AGENTS_COUNT);
    if (compatibleAgentsCount != null) {
        result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

            public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                if (item.getBuildType() == null)
                    return false;
                long count = 0;
                for (SBuildAgent agent : myAgentFinder.getItems(null).myEntries) {
                    // or should process unauthorized as well?
                    if (AgentFinder.canActuallyRun(agent, item.getBuildType()) && agent.isRegistered() && agent.isAuthorized() && agent.isEnabled())
                        count++;
                    if (count > compatibleAgentsCount)
                        return false;
                }
                return count == compatibleAgentsCount;
            }
        });
    }
    if (locator.isUnused(DIMENSION_SELECTED)) {
        final String selectedByUser = locator.getSingleDimensionValue(DIMENSION_SELECTED);
        if (selectedByUser != null) {
            List<BuildTypeOrTemplate> filterSet = getSelectedByUser(locator, selectedByUser);
            result.add(item -> filterSet.contains(item));
        }
    }
    final String parameterDimension = locator.getSingleDimensionValue(PARAMETER);
    if (parameterDimension != null) {
        final ParameterCondition parameterCondition = ParameterCondition.create(parameterDimension);
        result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

            public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                final boolean canView = !BuildType.shouldRestrictSettingsViewing(item.get(), myPermissionChecker);
                if (!canView) {
                    LOG.debug("While filtering build types by " + PARAMETER + " user does not have enough permissions to see settings. Excluding build type: " + item.describe(false));
                    return false;
                }
                return parameterCondition.matches(item.get());
            }
        });
    }
    final String settingDimension = locator.getSingleDimensionValue(SETTING);
    if (settingDimension != null) {
        final ParameterCondition condition = ParameterCondition.create(settingDimension);
        result.add(item -> {
            final boolean canView = !BuildType.shouldRestrictSettingsViewing(item.get(), myPermissionChecker);
            if (!canView) {
                LOG.debug("While filtering build types by " + SETTING + " user does not have enough permissions to see settings. Excluding build type: " + item.describe(false));
                return false;
            }
            return condition.matches(new MapParametersProviderImpl(BuildTypeUtil.getSettingsParameters(item, null, true, false)), new MapParametersProviderImpl(BuildTypeUtil.getSettingsParameters(item, null, true, false)));
        });
    }
    final Boolean template = locator.getSingleDimensionValueAsBoolean(TEMPLATE_FLAG_DIMENSION_NAME);
    if (template != null) {
        result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

            public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                return FilterUtil.isIncludedByBooleanFilter(template, item.isTemplate());
            }
        });
    }
    final String type = locator.getSingleDimensionValue(TYPE);
    if (type != null) {
        String typeOptionValue = TypedFinderBuilder.getEnumValue(type, BuildTypeOptions.BuildConfigurationType.class).name();
        result.add(item -> typeOptionValue.equals(item.get().getOption(BuildTypeOptions.BT_BUILD_CONFIGURATION_TYPE)));
    }
    // experimental
    final String filterBuilds = locator.getSingleDimensionValue(FILTER_BUILDS);
    if (filterBuilds != null) {
        BuildPromotionFinder promotionFinder = myServiceLocator.getSingletonService(BuildPromotionFinder.class);
        FinderSearchMatcher<BuildPromotion> matcher = new FinderSearchMatcher<>(filterBuilds, promotionFinder);
        result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

            @Override
            public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                SBuildType buildType = item.getBuildType();
                if (buildType == null)
                    return false;
                String defaults = Locator.getStringLocator(BuildPromotionFinder.BUILD_TYPE, BuildTypeFinder.getLocator(buildType), PagerData.COUNT, "1");
                return matcher.matches(defaults);
            }
        });
    }
    final String snapshotDependencies = locator.getSingleDimensionValue(SNAPSHOT_DEPENDENCY);
    if (snapshotDependencies != null) {
        final GraphFinder<BuildTypeOrTemplate> graphFinder = new GraphFinder<BuildTypeOrTemplate>(this, new SnapshotDepsTraverser(myPermissionChecker));
        final List<BuildTypeOrTemplate> boundingList = graphFinder.getItems(snapshotDependencies).myEntries;
        result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

            public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                return boundingList.contains(item);
            }
        });
    }
    final String artifactDependencies = locator.getSingleDimensionValue(ARTIFACT_DEPENDENCY);
    if (artifactDependencies != null) {
        final GraphFinder<BuildTypeOrTemplate> graphFinder = new GraphFinder<BuildTypeOrTemplate>(this, new ArtifactDepsTraverser(myPermissionChecker));
        final List<BuildTypeOrTemplate> boundingList = graphFinder.getItems(artifactDependencies).myEntries;
        result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

            public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                return boundingList.contains(item);
            }
        });
    }
    final String templateLocator = locator.getSingleDimensionValue(TEMPLATE_DIMENSION_NAME);
    if (templateLocator != null) {
        try {
            // only this can throw exceptions caught later
            final BuildTypeTemplate buildTemplate = getBuildTemplate(null, templateLocator, true);
            final List<BuildTypeOrTemplate> boundingList = BuildTypes.fromBuildTypes(buildTemplate.getUsages());
            result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

                public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                    return boundingList.contains(item);
                }
            });
        } catch (NotFoundException e) {
            // legacy support for boolean template
            Boolean legacyTemplateFlag = null;
            try {
                legacyTemplateFlag = locator.getSingleDimensionValueAsBoolean(TEMPLATE_DIMENSION_NAME);
            } catch (LocatorProcessException eNested) {
                // not a boolean, throw original error
                throw new NotFoundException("No templates found by locator '" + templateLocator + "' specified in '" + TEMPLATE_DIMENSION_NAME + "' dimension : " + e.getMessage());
            }
            // legacy request detected
            if (legacyTemplateFlag != null) {
                final boolean legacyTemplateFlagFinal = legacyTemplateFlag;
                result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

                    public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                        return FilterUtil.isIncludedByBooleanFilter(legacyTemplateFlagFinal, item.isTemplate());
                    }
                });
            }
        } catch (BadRequestException e) {
            throw new BadRequestException("Error while searching for templates by locator '" + templateLocator + "' specified in '" + TEMPLATE_DIMENSION_NAME + "' dimension : " + e.getMessage(), e);
        }
    }
    if (locator.isUnused(VCS_ROOT_DIMENSION)) {
        final String vcsRoot = locator.getSingleDimensionValue(VCS_ROOT_DIMENSION);
        if (vcsRoot != null) {
            final Set<SVcsRoot> vcsRoots = new HashSet<SVcsRoot>(myServiceLocator.getSingletonService(VcsRootFinder.class).getItems(vcsRoot).myEntries);
            result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

                public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                    for (VcsRootInstanceEntry vcsRootInstanceEntry : item.getVcsRootInstanceEntries()) {
                        if (vcsRoots.contains(vcsRootInstanceEntry.getVcsRoot().getParent()))
                            return true;
                    }
                    return false;
                }
            });
        }
    }
    if (locator.isUnused(VCS_ROOT_INSTANCE_DIMENSION)) {
        final String vcsRootInstance = locator.getSingleDimensionValue(VCS_ROOT_INSTANCE_DIMENSION);
        if (vcsRootInstance != null) {
            final Set<jetbrains.buildServer.vcs.VcsRootInstance> vcsRootInstances = new HashSet<jetbrains.buildServer.vcs.VcsRootInstance>(myServiceLocator.getSingletonService(VcsRootInstanceFinder.class).getItems(vcsRootInstance).myEntries);
            result.add(new FilterConditionChecker<BuildTypeOrTemplate>() {

                public boolean isIncluded(@NotNull final BuildTypeOrTemplate item) {
                    for (VcsRootInstanceEntry vcsRootInstanceEntry : item.getVcsRootInstanceEntries()) {
                        if (vcsRootInstances.contains(vcsRootInstanceEntry.getVcsRoot()))
                            return true;
                    }
                    return false;
                }
            });
        }
    }
    return result;
}
Also used : LocatorProcessException(jetbrains.buildServer.server.rest.errors.LocatorProcessException) java.util(java.util) AuthorizationFailedException(jetbrains.buildServer.server.rest.errors.AuthorizationFailedException) LocatorName(jetbrains.buildServer.server.rest.swagger.constants.LocatorName) LocatorResource(jetbrains.buildServer.server.rest.swagger.annotations.LocatorResource) BuildTypeOrTemplate(jetbrains.buildServer.server.rest.util.BuildTypeOrTemplate) Converter(jetbrains.buildServer.util.Converter) BadRequestException(jetbrains.buildServer.server.rest.errors.BadRequestException) BuildType(jetbrains.buildServer.server.rest.model.buildType.BuildType) LocatorDimensionDataType(jetbrains.buildServer.server.rest.swagger.constants.LocatorDimensionDataType) Dependency(jetbrains.buildServer.serverSide.dependency.Dependency) VcsRootInstanceEntry(jetbrains.buildServer.vcs.VcsRootInstanceEntry) SArtifactDependency(jetbrains.buildServer.serverSide.artifacts.SArtifactDependency) StringUtil(jetbrains.buildServer.util.StringUtil) LogUtil(jetbrains.buildServer.serverSide.impl.LogUtil) Logger(com.intellij.openapi.diagnostic.Logger) CollectionsUtil(jetbrains.buildServer.util.CollectionsUtil) PagerData(jetbrains.buildServer.server.rest.model.PagerData) SVcsRoot(jetbrains.buildServer.vcs.SVcsRoot) ServiceLocator(jetbrains.buildServer.ServiceLocator) BuildTypeUtil(jetbrains.buildServer.server.rest.model.buildType.BuildTypeUtil) jetbrains.buildServer.serverSide(jetbrains.buildServer.serverSide) Collectors(java.util.stream.Collectors) APIController(jetbrains.buildServer.server.rest.APIController) MapParametersProviderImpl(jetbrains.buildServer.parameters.impl.MapParametersProviderImpl) Nullable(org.jetbrains.annotations.Nullable) LocatorDimension(jetbrains.buildServer.server.rest.swagger.annotations.LocatorDimension) Permission(jetbrains.buildServer.serverSide.auth.Permission) NotFoundException(jetbrains.buildServer.server.rest.errors.NotFoundException) BuildTypes(jetbrains.buildServer.server.rest.model.buildType.BuildTypes) NotNull(org.jetbrains.annotations.NotNull) VcsManager(jetbrains.buildServer.vcs.VcsManager) SUser(jetbrains.buildServer.users.SUser) NotFoundException(jetbrains.buildServer.server.rest.errors.NotFoundException) NotNull(org.jetbrains.annotations.NotNull) LocatorProcessException(jetbrains.buildServer.server.rest.errors.LocatorProcessException) SVcsRoot(jetbrains.buildServer.vcs.SVcsRoot) BuildTypeOrTemplate(jetbrains.buildServer.server.rest.util.BuildTypeOrTemplate) VcsRootInstanceEntry(jetbrains.buildServer.vcs.VcsRootInstanceEntry) BadRequestException(jetbrains.buildServer.server.rest.errors.BadRequestException) MapParametersProviderImpl(jetbrains.buildServer.parameters.impl.MapParametersProviderImpl) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

Logger (com.intellij.openapi.diagnostic.Logger)2 java.util (java.util)2 Collectors (java.util.stream.Collectors)2 BuildTypeUtil (jetbrains.buildServer.server.rest.model.buildType.BuildTypeUtil)2 Api (io.swagger.annotations.Api)1 ApiOperation (io.swagger.annotations.ApiOperation)1 ApiParam (io.swagger.annotations.ApiParam)1 java.io (java.io)1 Consumer (java.util.function.Consumer)1 Pattern (java.util.regex.Pattern)1 ServletContext (javax.servlet.ServletContext)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1 HttpServletResponse (javax.servlet.http.HttpServletResponse)1 javax.ws.rs (javax.ws.rs)1 javax.ws.rs.core (javax.ws.rs.core)1 BuildProblemData (jetbrains.buildServer.BuildProblemData)1 QueuedBuild (jetbrains.buildServer.QueuedBuild)1 ServiceLocator (jetbrains.buildServer.ServiceLocator)1 ServerProvidedProperties (jetbrains.buildServer.agent.ServerProvidedProperties)1 ActionErrors (jetbrains.buildServer.controllers.ActionErrors)1