/IbmIntegrationBusGradlePlugin

Create an automation script for building, packaging and deploying IBM IIB BAR files

Primary LanguageGroovy

Gradle plugin for IBM Integration Bus

This plugin helps developer to build, apply properties and deploy BAR file easily and without too many settings. The default behaviour of the task deploy is to build all IIB applications in your workspace and add them to a bar and deploy it to the default local broker / execution group, which helps much in building CI environment. The plugin can be used along with a Gradle SOAPUI plugin and Jenkins to build up a perfect CI environment. With minimum settings, the plugin can be setup to include specific workspace projects, perform up-to-date checks, creates a bar that include pre-specified applications, override the generated bar properties and deploy it to a specific local or remote broker/execution group.

The plugin tasks are:

  1. 'pack' performs the build and BAR packaging operation.
  2. 'applyproperties' overrides BAR properties with ones in an external properties file. If the file path is not set, the task will be skipped.
  3. 'deploy' deploys the generated bar. If neither remote nor local broker is specific, the task deploys the BAR file to the local broker.

How to use it

1- Create a directory in your workspace.

2- Copy the below code to your "build.gradle" file.

repositories {
    mavenCentral()
}
dependencies {
        classpath group: 'org.mostafa', name: 'IbmIntegrationBusPlugin', version: '1.0'
   }
apply plugin: 'org.mostafa.IbmIntegrationBusPlugin'
//The below part is optional. It should be used to override the default behaviour
iib {
  //srcDirs: use this property to enable up-to-date check so that the build script does not build new bar if the source did not changed. The default behavior is building everytime the task is called.
	srcDirs='Test1App Test1AppLib Test2App Test2AppLib'
	//applications: use this properties to control which applications to be added in the generated BAR file.
	//The plugin default behaviour is to add all the applications in the workspace
	applications='Test1App Test2App'
	//barPropertiesFile: use this property to set the path to the .properties file which will be used by mqsibaroverride command.
	//If this property is not set, the plugin will skip the applyproperties task
	barPropertiesFile='bar.properties'
	//brokerFile: use this property to specific a remote broker.
	//If neither brokerFile nor localBroker properties are set, the plugin will automatically deploy to the existent local broker
	brokerFile='dev.broker'
	//localBroker: specify the local broker name.
	localBroker=testBroker1'
	//executionGroup: specify the execution group name.
	executionGroup='default'
   }

3- The gradle deploy command must run from IBM Integration Console

Please feel free to suggest or comment or directly contribute to the plugin.