Class SwarmConfigFile

java.lang.Object
hudson.model.AbstractDescribableImpl<SwarmConfigFile>
io.jenkins.plugins.swarmcloud.SwarmConfigFile
All Implemented Interfaces:
Describable<SwarmConfigFile>

public class SwarmConfigFile extends AbstractDescribableImpl<SwarmConfigFile>
Configuration for Docker Swarm Configs to be mounted in agent containers. Docker Configs are similar to Secrets but designed for non-sensitive configuration data. Format for parsing: configName:targetPath (e.g., nethasp.ini:/opt/1cv8/current/conf/nethasp.ini)
  • Constructor Details

    • SwarmConfigFile

      @DataBoundConstructor public SwarmConfigFile(@NonNull String configName)
  • Method Details

    • parse

      @Nullable public static SwarmConfigFile parse(String configString)
      Parses a config string in format "configName:targetPath". Example: "nethasp.ini:/opt/1cv8/current/conf/nethasp.ini"
      Parameters:
      configString - The config string to parse
      Returns:
      SwarmConfigFile instance or null if parsing fails
    • getConfigName

      @NonNull public String getConfigName()
    • getTargetPath

      @Nullable public String getTargetPath()
    • setTargetPath

      @DataBoundSetter public void setTargetPath(String targetPath)
    • getFileName

      @Nullable public String getFileName()
    • setFileName

      @DataBoundSetter public void setFileName(String fileName)
    • getFileMode

      @Nullable public String getFileMode()
    • setFileMode

      @DataBoundSetter public void setFileMode(String fileMode)
    • getUid

      @Nullable public String getUid()
    • setUid

      @DataBoundSetter public void setUid(String uid)
    • getGid

      @Nullable public String getGid()
    • setGid

      @DataBoundSetter public void setGid(String gid)
    • getEffectiveTargetPath

      @NonNull public String getEffectiveTargetPath()
      Returns the effective target path for the config. If target path is not set, defaults to /{configName}
    • getEffectiveFileName

      @NonNull public String getEffectiveFileName()
      Returns the effective file name. Extracts filename from target path if not explicitly set.
    • getFileModeAsLong

      @Nullable public Long getFileModeAsLong()
      Returns the file mode as a Long, or null if not specified.
    • toString

      public String toString()
      Returns string representation in format "configName:targetPath".
      Overrides:
      toString in class Object