Interface BuildCustomizerEx

    • Method Detail

      • setStickToRevisions

        void setStickToRevisions​(boolean stickToRevisions)
      • setApplyTagsToDependencies

        void setApplyTagsToDependencies​(boolean value)
        Marks if tags should be applied to all builds that this build snapshot depends on
        Since:
        9.0
      • setApplyCleanSourcesToDependencies

        void setApplyCleanSourcesToDependencies​(boolean apply)
        If apply is true, then applies clean sources configuration to all of the snapshot dependencies.
        Since:
        2017.1
      • setAddToFavorites

        void setAddToFavorites​(boolean value)
        Control whether build will be added to favorite or not Overrides StandardProperties.ADD_TRIGGERED_BUILD_TO_FAVORITES
        Since:
        9.1
        See Also:
        FavoriteBuildsManager
      • setPromotedBuild

        void setPromotedBuild​(@NotNull
                              SBuild build,
                              @NotNull
                              Predicate<RevisionRule> artifDependencyRevisionPredicate)
                       throws BuildTypeNotFoundException
        Promotes build into dependencies of the build created by this build customizer. If there is a snapshot dependency on build configuration of provided build, then corresponding modification id will be calculated and set and snapshot dependencies will be modified. If there are artifact dependencies on build configuration of provided build (except the same chain dependencies, they will be left intact), then they will be modified to have direct dependencies on this build.
        Parameters:
        build - build to promote
        artifDependencyRevisionPredicate - dependent build configuration can have many artifact dependencies with different rules pointing to the build configuration of promoted build; this predicate determines which revision rules must be changed to point at the promoted build.
        Throws:
        BuildTypeNotFoundException - if build configuration of specified build cannot be found
        Since:
        9.1
      • setDesiredBranchName

        void setDesiredBranchName​(@NotNull
                                  String branchName,
                                  boolean defaultBranchFallback)
        Sets the desired branch name for the build promotion (will be propagated to the whole snapshot dependency graph).
        Parameters:
        branchName - the branch name - empty string means default branch
        defaultBranchFallback - true means that when display name of the default branch is passed, build in the default branch will be triggered. false just sets the branch name as passed
        Since:
        2019.2.1
      • getDesiredBranchName

        @Nullable
        String getDesiredBranchName()
        Returns:
        the specified desired branch name, if any. Could be used by extensions to check if branch was set
        Since:
        2022.06
      • addSkippedDependencies

        void addSkippedDependencies​(Collection<String> externalBuildTypeIds)
        Parameters:
        externalBuildTypeIds - for configurations which should be excluded/skipped in the build chain
        Since:
        2024.12
      • auto

        static BuildCustomizerEx.UpToModificationSelectionMode auto()
        Enables automatic detection of changes included in the build. Considers build dependencies settings: - all promotions reachable from added in setSnapshotDependencyNodes() will get one revision - promotion chains reachable only by soft build dependencies will be handled separately Resets setChangesUpTo()
      • checkForChanges

        static BuildCustomizerEx.UpToModificationSelectionMode checkForChanges()
        Changes will be collected before build started and the latest modifications will be used. NB! this ignores build dependencies settings - both snapshot and soft. Equivalent for setChangesUpTo().
      • selected

        static BuildCustomizerEx.UpToModificationSelectionMode selected​(@NotNull
                                                                        SVcsModification modification)
        Selected modification will be used as maxModificationId for whole created chain. NB! this ignores build dependencies settings - both snapshot and soft. Resets setChangesUpTo()
        Parameters:
        modification -
      • setNodeRevisions

        void setNodeRevisions​(@NotNull
                              String buildTypeId,
                              long modId,
                              long chainModId,
                              @NotNull
                              Collection<BuildRevisionEx> revisions)
        Sets revision information to node of the build chain which corresponds to specified build configuration internal id
        Parameters:
        buildTypeId -
        modId -
        chainModId -
        revisions -
        Since:
        2019.1
      • getCustomParameters

        @NotNull
        Map<String,​Parameter> getCustomParameters()
        Since:
        2021.1
      • setDependenciesSupplier

        void setDependenciesSupplier​(@NotNull
                                     DependenciesSupplier supplier)
        Sets a custom dependencies supplier which should be used when a build promotion is created. The supplier allows to affect how build promotion build graph is created by providing dependencies different from those which are currently present in the build configuration.
        Parameters:
        supplier - dependencies supplier
        Since:
        2022.02
      • setScheduledTime

        void setScheduledTime​(@NotNull
                              ZonedDateTime date)
        Allows to force the build to wait in the queue until some time in the future
        Parameters:
        date - - the time when build can start, i.e. it's guaranteed that it won't start before
        Since:
        2023.07
      • setProvidedUpperLimitRevisions

        void setProvidedUpperLimitRevisions​(@NotNull
                                            Map<Long,​RepositoryVersion> upperLimitRevisions)
        Sets upper limit revisions map as "provided" upper limit revisions: they will be used instead of the current revision during the checking for changes process
        Parameters:
        upperLimitRevisions - map of VCS root instance id to repository version
        Since:
        2024.07