Class ServerCapabilitiesControl

    • Constructor Detail

      • ServerCapabilitiesControl

        public ServerCapabilitiesControl​(@NotNull
                                         @NotNull BambooEnvironmentData environmentData)
    • Method Detail

      • detectServerCapabilities

        public void detectServerCapabilities()
        Call standard "Detect server capabilities" action. Will update existing configuration.
      • redetectServerCapabilities

        public void redetectServerCapabilities()
        Call REST endpoint defined in bamboo-test-utils-plugin. Will remove existing capabilities and detect them again.
      • createCapability

        public void createCapability​(@NotNull
                                     @NotNull String key,
                                     @Nullable
                                     @Nullable String value)
        Create shared server capability
        Parameters:
        key - capability key
        value - capability value
      • createGrailsExecutable

        public void createGrailsExecutable​(@NotNull
                                           @NotNull String name,
                                           @Nullable
                                           @Nullable String path)
        Convenience method for creating Grails capability
        Parameters:
        name - name of Grails executable
        path - path to Grails binary
      • createJdkCapability

        public void createJdkCapability​(@NotNull
                                        @NotNull String name,
                                        @Nullable
                                        @Nullable String path)
        Create JDK capability.
      • createCommandExecutable

        public void createCommandExecutable​(@NotNull
                                            @NotNull String name,
                                            @Nullable
                                            @Nullable String path)
        Convenience method for creating Command capability
        Parameters:
        name - name of Command executable
        path - path to Command binary
      • deleteCapability

        public void deleteCapability​(@NotNull
                                     @NotNull String capabilityKey)
        Delete capability, will throw exception if REST endpoint returns an error (most probably capability doesn't exist)
        Parameters:
        capabilityKey - key of capability to be deleted
      • deleteCapabilityQuietly

        public void deleteCapabilityQuietly​(@NotNull
                                            @NotNull String capabilityKey)
        Delete capability, will throw exception if REST endpoint returns an error (most probably capability doesn't exist)
        Parameters:
        capabilityKey - key of capability to be deleted
      • gitPath

        public String gitPath()
      • getServerExecutable

        public String getServerExecutable​(@NotNull
                                          @NotNull String namePattern)
        Get value of server executable capability
        Parameters:
        namePattern - pattern that should match server executable name
      • serverExecutableExists

        public boolean serverExecutableExists​(@NotNull
                                              @NotNull String namePattern)
        Check if given server executable capability exist
        Parameters:
        namePattern - pattern that should match server executable name
      • jdkExists

        public boolean jdkExists​(@NotNull
                                 @NotNull String jdkLabel)
        Check if given JDK capability exists
      • getAllCapabilities

        public List<RestCapability> getAllCapabilities()
        Return full list of shared server capabilities