com.ibm.streamsx.rest.build
Interface BuildService
-
public interface BuildService
Access to a IBM Streams build service.- Since:
- 1.12
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method and Description void
allowInsecureHosts()
Build
createBuild(java.lang.String buildName, com.google.gson.JsonObject buildConfig)
Submit an archive to build using the IBM Streams build service.java.util.List<BaseImage>
getBaseImages()
Gets a list ofbaseImages
for EDGE applications available in the build service.Toolkit
getToolkit(java.lang.String toolkitId)
Gets atoolkit
installed on the IBM Streams build service.java.util.List<Toolkit>
getToolkits()
Gets a list oftoolkits
installed on the IBM Streams build service.static BuildService
ofEndpoint(java.lang.String endpoint, java.lang.String name, java.lang.String userName, java.lang.String password, boolean verify)
static BuildService
ofServiceDefinition(com.google.gson.JsonObject serviceDefinition, boolean verify)
Toolkit
uploadToolkit(java.io.File path)
Install a toolkit in the build service from a local path.
-
-
-
Method Detail
-
ofEndpoint
static BuildService ofEndpoint(java.lang.String endpoint, java.lang.String name, java.lang.String userName, java.lang.String password, boolean verify) throws java.io.IOException
- Throws:
java.io.IOException
-
ofServiceDefinition
static BuildService ofServiceDefinition(com.google.gson.JsonObject serviceDefinition, boolean verify) throws java.io.IOException
- Throws:
java.io.IOException
-
allowInsecureHosts
void allowInsecureHosts()
-
createBuild
Build createBuild(java.lang.String buildName, com.google.gson.JsonObject buildConfig) throws java.io.IOException
Submit an archive to build using the IBM Streams build service.The returned
Result
instance has:Result.getId()
returning the job identifier ornull
if a job was not created..Result.getElement()
returning aJob
instance for the submitted job ornull
if a job was not created.Result.getRawResult()
return the raw JSON response.
- Parameters:
archive
- The application archive to build.buildName
- A name for the build, or null.buildConfig
- Build configuration, or null.- Returns:
- Result of the build and job submission.
- Throws:
java.io.IOException
- Error communicating with the service.
-
getToolkits
java.util.List<Toolkit> getToolkits() throws java.io.IOException
Gets a list oftoolkits
installed on the IBM Streams build service.- Throws:
java.io.IOException
- Since:
- 1.13
-
getToolkit
Toolkit getToolkit(java.lang.String toolkitId) throws java.io.IOException
Gets atoolkit
installed on the IBM Streams build service.- Parameters:
toolkitId
- The ID of the toolkit to retrieve.- Returns:
- The toolkit, or null if no matching toolkit was found.
- Throws:
java.io.IOException
- Since:
- 1.13
-
uploadToolkit
Toolkit uploadToolkit(java.io.File path) throws java.io.IOException
Install a toolkit in the build service from a local path. The path must be a directory containing a single toolkit. If the toolkit's name and version exactly match those of a toolkit already in the build service, the existing toolkit will not be replaced.- Returns:
- A
Toolkit
object representing the newly installed toolkit, or null if the toolkit was not installed. - Throws:
java.io.IOException
-
getBaseImages
java.util.List<BaseImage> getBaseImages() throws java.io.IOException
Gets a list ofbaseImages
for EDGE applications available in the build service.- Returns:
- The base images or an empty list
- Throws:
java.io.IOException
-
-