Class TriggeredBuildSelector

    • Constructor Detail

      • TriggeredBuildSelector

        @DataBoundConstructor
        public TriggeredBuildSelector()
      • TriggeredBuildSelector

        @Deprecated
        public TriggeredBuildSelector​(boolean fallbackToLastSuccessful,
                                      TriggeredBuildSelector.UpstreamFilterStrategy upstreamFilterStrategy,
                                      boolean allowUpstreamDependencies)
        Deprecated.
        Parameters:
        fallbackToLastSuccessful - true to fallback to the last successful build when no appropriate build is found.
        upstreamFilterStrategy - strategy to pick the most appropriate upstream build.
        allowUpstreamDependencies - true to scan upstream builds also using relation provided by fingerprints.
      • TriggeredBuildSelector

        @Deprecated
        public TriggeredBuildSelector​(boolean fallbackToLastSuccessful,
                                      TriggeredBuildSelector.UpstreamFilterStrategy upstreamFilterStrategy)
        Deprecated.
        Parameters:
        fallbackToLastSuccessful - true to fallback to the last successful build when no appropriate build is found.
        upstreamFilterStrategy - strategy to pick the most appropriate upstream build.
      • TriggeredBuildSelector

        @Deprecated
        public TriggeredBuildSelector​(boolean fallback)
        Deprecated.
        Parameters:
        fallback - true to fallback to the last successful build when no appropriate build is found.
    • Method Detail

      • isFallbackToLastSuccessful

        public boolean isFallbackToLastSuccessful()
      • setFallbackToLastSuccessful

        @DataBoundSetter
        public void setFallbackToLastSuccessful​(boolean fallbackToLastSuccessful)
        Parameters:
        fallbackToLastSuccessful - true to fallback to the last successful build when no appropriate build is found.
      • setUpstreamFilterStrategy

        @DataBoundSetter
        public void setUpstreamFilterStrategy​(TriggeredBuildSelector.UpstreamFilterStrategy upstreamFilterStrategy)
        Parameters:
        upstreamFilterStrategy - strategy to pick the most appropriate upstream build.
      • isUseNewest

        public boolean isUseNewest()
        Returns:
        whether to use the newest upstream or not (use the oldest) when there are multiple upstreams.
      • isAllowUpstreamDependencies

        public boolean isAllowUpstreamDependencies()
      • setAllowUpstreamDependencies

        @DataBoundSetter
        public void setAllowUpstreamDependencies​(boolean allowUpstreamDependencies)
        Parameters:
        allowUpstreamDependencies - true to scan upstream builds also using relation provided by fingerprints.
      • getBuild

        public Run<?,​?> getBuild​(Job<?,​?> job,
                                       EnvVars env,
                                       BuildFilter filter,
                                       Run<?,​?> parent)
        Description copied from class: BuildSelector
        Find a build to copy artifacts from.
        Overrides:
        getBuild in class BuildSelector
        Parameters:
        job - Source project
        env - Environment for build that is copying artifacts
        filter - Additional filter; returned result should return true (return null otherwise)
        parent - Build to which artifacts are being copied
        Returns:
        Build to use, or null if no appropriate build was found
      • isSelectable

        protected boolean isSelectable​(Run<?,​?> run,
                                       EnvVars env)
        Description copied from class: BuildSelector
        Should this build be selected? Override just this method to use a standard loop through completed builds, starting with the most recent.
        Overrides:
        isSelectable in class BuildSelector
        Parameters:
        run - Build to check
        env - Environment for build that is copying artifacts
        Returns:
        True to select this build