Continuous Build and Publish

You can build user-created assets and configurations using webMethods Asset Build Environment (ABE), retrieve those assets and configurations from a VCS by using ABE or an automated tool like Jenkins, and then deploy those assets and configurations to the webMethods Cloud Default Environment by using ABE.

Basic build and publish mechanism

Note: Command Central usage for Integration Server and Universal Messaging configuration deployment is deprecated. It is recommended to use the Integration Server or Universal messaging to deploy assets and configurations to IBM® webMethods Cloud Container.

Steps describing the CI/CD mechanism

  1. Create the assets on the development environment and export or copy them to a file system or version control system (VCS), from which the build process can obtain them. The location to which you export or copy the assets is called the source directory.

  2. Install webMethods Asset Build Environment (ABE) ABE installs the build scripts and the build properties file that you use to build the composites and descriptors. See the Building Composites for Repository-Based Deployment section in the webMethods Deployer Users Guide for more information.

  3. Set the properties for the build and run the build script in ABE to create the composites and descriptorsSee the Building Composites for Repository-Based Deployment section in the webMethods Deployer Users Guide for more information.

  4. Use ABE to push the composites and descriptors to the webMethods Cloud Asset RepositoryApart from providing values to the properties in build.properties, specify the following additional properties to upload composites and descriptors to the webMethods Cloud Asset Repository.

    Property Definition
    localStore Represents the local folder where the Git repository is cloned or the local Git repository. localStore must be the same as the build.output.dir.
    remoteStore URL of the webMethods Cloud Asset Repository. The URL format is: https://mysubdomain.container.webmethodscloud.com/integration/rest/internal/wmic-git/[solutionname]-[productaliasname] Example: https://mysubdomain.container.webmethodscloud.com/integration/rest/internal/wmic-git/development-mysolution-myis
    message Required. Message which describes the commits.
    username Required. IBM webMethods Cloud Container login user name.
    password Required. IBM webMethods Cloud Container login password.
  5. Run one of the following commands from the installation_directory]\common\AssetBuildEnvironment\bin directory to build and upload the composites and descriptors to the webMethods Cloud Asset Repository:

    For this platform... Run the following command...
    Windows™ build.bat buildUploadAssets
    UNIX™ build.sh buildUploadAssets
  6. Promoting assets to the next environment

    Using an automated tool like Jenkins, invoke the following API to promote the assets to the next environment:

Method: POST
URL: `https://{subdomain}.container.webmethodscloud.com/integration/rest/external/v1/cdep/binaryAssets/solutions/{solutionName}/nodes/{nodeName}?action=promote`

URI parameters

  • solutionName - Name of the solution in IBM webMethods Cloud Container.
  • sourcenodeName - webMethods Integration Server instance where the assets need to be deployed.

Query parameters

  • sourceSolution - webMethods Integration Server solution name from where the assets needs to be promoted.
  • sourcenodeName - webMethods Integration Server instance name from where the assets needs to be deployed.
Note: Use Basic Authentication as the HTTP authorization method.

Request Body: The request body should contain the following:

  • commitMessage: An optional commit message
  • acdlComposite: List of composites, assets, and their properties, which are available in the other environment.
Note: If you want to retrieve the request body, invoke the getcomposites API as provided in Step b. The getcomposites API will get the composites and asset details from the previous environment.

Sample Request Body

	
{
"integration": {
"cicdBean": {
"commitMessage": "Promoting assets from source environment to target environment.",
"acdlComposite": {
"IS": [{
"name": "mySqlAssets",
"targetNamespace": "http://namespaces.softwareag.com/
webMethods/IS",
"assets": [],
"properties": [{
"name": "activatePkgOnInstall",
"values": [
"true"
]
},
{
"name": "archivePkgOnInstall",
"values": [
"true"
]
},
{
"name": "compilePackage",
"values": [
"true"
]
}
]
},
{
"name": "JDBCRegression_deployment",
"targetNamespace": "http://namespaces.softwareag.com/
webMethods/IS",
"assets": [{
"name": "deploy.notifications.deleteN",
"properties": [{
"name": "art.deployment.state",
"values": [
"disable"
]
},
{
"name": "notificationImmediate",
"values": [
"false"
]},
{"name": "notificationInterval",
"values": [
"10"
]},
{
"name": "notificationOverlap",
"values": [
"false"
]}]}],
"properties": [{
"name": "activatePkgOnInstall",
"values": [
"true"
]	}]	}]
}
}
}
}

getcomposites API

getcomposites retrieves all the composites and its assets which have properties.

Method: GET

URL: https://{subdomain}.container.webmethodscloud.com/integration/rest/external/v1/cdep/binaryAssets/solutions/{solutionName}/nodes/{nodeName}

URI parameters

  • solutionName: Name of the solution in IBM webMethods Cloud Container.
  • nodeName: webMethods Integration Server instance
  • where the assets need to be deployed.

Query parameters

fromEnv: Environment name from which assets are retrieved.

NOTEUse Basic Authentication as the HTTP authorization method.

Sample Response


{
"integration": {	
"message": {	
"code": 0,
"description": "Success"
},	
"cicdBean": {"commitMessage": null,
"acdlComposite": {
"IS": [{
"name": "mySqlAssets",
"targetNamespace": "http://namespaces.softwareag.com/
webMethods/IS",
"assets": [],
"properties": [{
"name": "activatePkgOnInstall",
"values": [
"true"
]},	
{
"name": "archivePkgOnInstall",
"values": ["true"
]},
{"name": "compilePackage",
"values": [
"true"
]}]},
{
"name": "JDBCRegression_deployment",
"targetNamespace": "http://namespaces.softwareag.com/
webMethods/IS",
"assets": [{
"name": "deploy.notifications.deleteN",
"properties": [{
"name": "art.deployment.state",
"values": [
"disable"
]},
{
"name": "notificationImmediate",
"values": [
"false"]},
{
"name": "notificationInterval",
"values": [
"10"
]	},
{"name": "notificationOverlap",
"values": [
"false"
]}
]}],
"properties": [{
"name": "activatePkgOnInstall",
"values": [
"true"
]}]}]}}}}

The response contains the following:

  • acdlComposite: The composites, assets, and their properties. You can replace the asset properties where necessary, then use the Promote Assets API to promote the assets to another environment.