Class AgentBuild

  • All Implemented Interfaces:
    Loggable

    public class AgentBuild
    extends Object
    implements Loggable
    Contains necessary information about build to start on an agent. Used to transfer this information from server to agent when build starts.
    • Constructor Detail

      • AgentBuild

        public AgentBuild​(long buildId)
    • Method Detail

      • getBuildId

        public long getBuildId()
      • getBuildTypeId

        @NotNull
        public String getBuildTypeId()
      • setBuildTypeId

        public void setBuildTypeId​(@NotNull
                                   String buildTypeId)
      • getBuildTypeExternalId

        @NotNull
        public String getBuildTypeExternalId()
      • setBuildTypeExternalId

        public void setBuildTypeExternalId​(@NotNull
                                           String buildTypeExternalId)
      • setCheckoutDirectory

        public void setCheckoutDirectory​(@Nullable
                                         String checkoutDirectory)
      • setArtifactPaths

        public void setArtifactPaths​(String artifactPaths)
      • getArtifactPaths

        @Nullable
        public String getArtifactPaths()
      • isPersonal

        public boolean isPersonal()
      • isPersonalPatchAvailable

        public boolean isPersonalPatchAvailable()
      • setPersonal

        public void setPersonal​(boolean personal)
      • setPersonalPatchAvailable

        public void setPersonalPatchAvailable​(boolean personalPatchAvailable)
      • setBuildTypeOptions

        public void setBuildTypeOptions​(@NotNull
                                        Map<Option,​Object> options)
      • getCleanCheckoutEnforcedBuildId

        public long getCleanCheckoutEnforcedBuildId()
      • setCleanCheckoutEnforcedBuildId

        public void setCleanCheckoutEnforcedBuildId​(long cleanCheckoutEnforcedBuildId)
      • setDefaultExecutionTimeout

        public void setDefaultExecutionTimeout​(int executionTimeout)
      • getDefaultExecutionTimeout

        public int getDefaultExecutionTimeout()
      • getAccessUser

        @NotNull
        public String getAccessUser()
      • getAccessCode

        @NotNull
        public String getAccessCode()
      • setAccessCode

        public void setAccessCode​(@NotNull
                                  String accessCode)
      • getServerParameters

        @NotNull
        public Map<String,​String> getServerParameters()
        Returns map of parameters defined on the server side. The map includes prefixed (system., env.) and configuration parameters (without prefix). System. and env. parameters will be sent to a build, while configuration parameters can only be used in references resolving.
        Returns:
        see above
      • setServerParameters

        public void setServerParameters​(@NotNull
                                        Map<String,​String> serverParameters)
      • setParametersSpecMap

        public void setParametersSpecMap​(Map<String,​String> parametersSpecs)
      • setRequiredTools

        public void setRequiredTools​(Collection<String> requiredTools)
      • getRequiredTools

        public List<String> getRequiredTools()
      • getParametersSpecMap

        @NotNull
        public Map<String,​String> getParametersSpecMap()
        Returns a map of parameters spec strings. ParametersUtil could be used to create ControlDescription instance from a string. Specs should not change during the build. The map contain only those parameter keys which have a spec.
      • setVcsRootEntries

        public void setVcsRootEntries​(@NotNull
                                      List<? extends VcsRootEntry> vcsRootEntries)
      • getPreviousRevision

        @Deprecated
        @Nullable
        public String getPreviousRevision​(@NotNull
                                          VcsRoot vcsRoot)
        Deprecated.
        use agent revision information from jetbrains.buildServer.agent.impl.vcs.AgentWorkDirRevisionManager instead
      • setPreviousRevision

        @Deprecated
        public void setPreviousRevision​(long vcsRootId,
                                        @Nullable
                                        String oldRevision)
        Deprecated.
        use agent revision information from jetbrains.buildServer.agent.impl.vcs.AgentWorkDirRevisionManager instead
      • getCurrentRevision

        @Nullable
        public String getCurrentRevision​(@NotNull
                                         VcsRoot vcsRoot)
      • setCurrentRevision

        public void setCurrentRevision​(long vcsRootId,
                                       @Nullable
                                       String currentRevision)
      • getFullCheckoutReasons

        @NotNull
        public List<String> getFullCheckoutReasons()
      • addFullCheckoutReason

        public void addFullCheckoutReason​(@NotNull
                                          String reason)
      • setDefaultCheckoutDirectory

        @Deprecated
        public void setDefaultCheckoutDirectory​(@NotNull
                                                String defaultDirNameRelativeToWorkingDir)
        Deprecated.
        since 10.0
      • setVcsSettingsHashForAgentCheckout

        public void setVcsSettingsHashForAgentCheckout​(@NotNull
                                                       String defaultDirNameRelativeToWorkingDir)
      • setVcsSettingsHashForServerCheckout

        public void setVcsSettingsHashForServerCheckout​(@NotNull
                                                        String defaultDirNameRelativeToWorkingDir)
      • setVcsSettingsHashForManualCheckout

        public void setVcsSettingsHashForManualCheckout​(@NotNull
                                                        String defaultDirNameRelativeToWorkingDir)
      • getVcsSettingsHashForServerCheckout

        @NotNull
        public String getVcsSettingsHashForServerCheckout()
      • getVcsSettingsHashForAgentCheckout

        @NotNull
        public String getVcsSettingsHashForAgentCheckout()
      • getVcsSettingsHashForManualCheckout

        @NotNull
        public String getVcsSettingsHashForManualCheckout()
      • getCheckoutDirectory

        @Nullable
        public String getCheckoutDirectory()
      • getOptionValue

        @Nullable
        public <T> T getOptionValue​(@NotNull
                                    Option<T> option)
      • getVcsChanges

        @NotNull
        public List<VcsChangeInfo> getVcsChanges()
        Returns list of VCS changed files affected by non personal modifications.
        Returns:
        see above
      • setVcsChanges

        public void setVcsChanges​(@NotNull
                                  List<VcsChangeInfo> vcsChanges)
      • setPersonalVcsChanges

        public void setPersonalVcsChanges​(@NotNull
                                          List<VcsChangeInfo> vcsChanges)
      • setUserBuildParameters

        public void setUserBuildParameters​(@NotNull
                                           Collection<String> userDefinedKeys)
      • getUserBuildParameters

        @NotNull
        public List<String> getUserBuildParameters()
      • getUserDefinedReferences

        @NotNull
        public Collection<String> getUserDefinedReferences()
      • setOwnerNodeId

        public void setOwnerNodeId​(String ownerNodeId)
      • getOwnerNodeId

        public String getOwnerNodeId()
      • getArtifactStorageSettings

        @NotNull
        public Map<String,​String> getArtifactStorageSettings()
      • setArtifactStorageSettings

        public void setArtifactStorageSettings​(@NotNull
                                               Map<String,​String> storageSettings)
      • getPersonalVcsChanges

        @NotNull
        public List<VcsChangeInfo> getPersonalVcsChanges()
        Returns list of VCS changed files affected by personal modification.
        Returns:
        see above
      • serialize

        @NotNull
        public String serialize()
      • deserialize

        @NotNull
        public static AgentBuild deserialize​(@NotNull
                                             String serialized)
      • deserialize

        @NotNull
        public static AgentBuild deserialize​(@NotNull
                                             Reader r)
      • describe

        @NotNull
        public String describe​(boolean verbose)
        Specified by:
        describe in interface Loggable
        Parameters:
        verbose - verbosity of object description
        Returns:
        description of this object. If verbose is true, description should have mode details.