Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLUGINS-1775] Added mqsiprofile script field to broker steps : create, delete, star… #36

Open
wants to merge 2 commits into
base: air
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/zip/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -287,5 +287,9 @@ Fixes APAR PH04149 - Add remote broker connection JARs and consider CLASSPATH en
<release-note plugin-version="46">
Fixes APAR PH04645 - Fixed receiving broker responses when broker refuses request.
</release-note>
<release-note plugin-version="47">
Added mqsiprofile script field to broker steps : create, delete, start, stop.
</release-note>

</release-notes>
</pluginInfo>
2 changes: 2 additions & 0 deletions src/main/zip/mqsi_profile_wrapper.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ else {
}

/* Parse Jar Path to create groovy classpath */
if(jarPath) {
for (def jarEntry : jarPath.split(File.pathSeparator)) {
def jarFile = new File(jarEntry.trim())

Expand Down Expand Up @@ -132,6 +133,7 @@ for (def jarEntry : jarPath.split(File.pathSeparator)) {
println("[Warning] ${jarFile} is not a file or directory on the file system, and it will be ignored.")
}
}
}

if (requiredJars) {
println("[Warning] the following jar files were not found on the Jar Path and are required with this"
Expand Down
106 changes: 101 additions & 5 deletions src/main/zip/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
xmlns:server="http://www.urbancode.com/PluginServerXMLSchema_v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<header>
<identifier id="com.urbancode.air.plugin.WMBCMP" name="WebSphere Message Broker - CMP" version="46"/>
<identifier id="com.urbancode.air.plugin.WMBCMP" name="WebSphere Message Broker - CMP" version="47"/>
<description>Integration for WebSphere Message Broker to deploy Broker Archives and start and stop Message Flows
using the CMP API. This plugin is compatible with both version 9 and 10 of IBM Integration Bus, and
is also compatible with versions 7 and 8 of WebSphere Message Broker.</description>
Expand Down Expand Up @@ -2215,6 +2215,29 @@
description="Any additional arguments to pass to the 'mqsicreatebroker' script when running this
step. Multiple arguments are split by new line. (e.g. '-i generalDefaultUserId')"/>
</property>
<property name="mqsiprofile">
<property-ui type="textBox"
label="MQSIPROFILE Executable"
default-value="${p?:resource/iib.mqsiprofile}"
description="The absolute path to the mqsiprofile executable on your IIB server.
Specifying this value will initialize your command environment. This
value is required if your command environment is not initialized on
startup through a script such as `.bashrc`."/>
</property>
<property name="env">
<property-ui type="textAreaBox"
label="Environment Variables"
default-value="${p?:resource/iib.environment}"
description="A file or list containing property entries, with each entry delimited by newlines.
Entries must be in the form 'VAR=VALUE' (i.e. java.library.path=/opt/mqm/java/lib64:
/opt/mqm/java/lib). Implemented to support z/OS using an ENVFILE."/>
</property>
<property name="shell">
<property-ui type="textBox"
label="Shell"
default-value="/bin/sh"
description="Path to your shell executable file." hidden="true"/>
</property>
</properties>
<post-processing><![CDATA[
if (properties.get("exitCode") != 0) {
Expand All @@ -2227,7 +2250,8 @@
<command program="${GROOVY_HOME}/bin/groovy">
<arg value="-cp"/>
<arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
<arg file="create_broker.groovy"/>
<arg file="mqsi_profile_wrapper.groovy"/>
<arg value="create_broker.groovy"/>
<arg file="${PLUGIN_INPUT_PROPS}"/>
<arg file="${PLUGIN_OUTPUT_PROPS}"/>
</command>
Expand Down Expand Up @@ -2257,6 +2281,29 @@
label="Delete Trace Files"
description="Check this box to delete the node's trace files from its work directory."/>
</property>
<property name="mqsiprofile">
<property-ui type="textBox"
label="MQSIPROFILE Executable"
default-value="${p?:resource/iib.mqsiprofile}"
description="The absolute path to the mqsiprofile executable on your IIB server.
Specifying this value will initialize your command environment. This
value is required if your command environment is not initialized on
startup through a script such as `.bashrc`."/>
</property>
<property name="env">
<property-ui type="textAreaBox"
label="Environment Variables"
default-value="${p?:resource/iib.environment}"
description="A file or list containing property entries, with each entry delimited by newlines.
Entries must be in the form 'VAR=VALUE' (i.e. java.library.path=/opt/mqm/java/lib64:
/opt/mqm/java/lib). Implemented to support z/OS using an ENVFILE."/>
</property>
<property name="shell">
<property-ui type="textBox"
label="Shell"
default-value="/bin/sh"
description="Path to your shell executable file." hidden="true"/>
</property>
</properties>
<post-processing><![CDATA[
if (properties.get("exitCode") != 0) {
Expand All @@ -2269,7 +2316,8 @@
<command program="${GROOVY_HOME}/bin/groovy">
<arg value="-cp"/>
<arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
<arg file="delete_broker.groovy"/>
<arg file="mqsi_profile_wrapper.groovy"/>
<arg value="delete_broker.groovy"/>
<arg file="${PLUGIN_INPUT_PROPS}"/>
<arg file="${PLUGIN_OUTPUT_PROPS}"/>
</command>
Expand All @@ -2288,6 +2336,29 @@
label="Integration Node (Broker)"
description="The name of the integration node to create."/>
</property>
<property name="mqsiprofile">
<property-ui type="textBox"
label="MQSIPROFILE Executable"
default-value="${p?:resource/iib.mqsiprofile}"
description="The absolute path to the mqsiprofile executable on your IIB server.
Specifying this value will initialize your command environment. This
value is required if your command environment is not initialized on
startup through a script such as `.bashrc`."/>
</property>
<property name="env">
<property-ui type="textAreaBox"
label="Environment Variables"
default-value="${p?:resource/iib.environment}"
description="A file or list containing property entries, with each entry delimited by newlines.
Entries must be in the form 'VAR=VALUE' (i.e. java.library.path=/opt/mqm/java/lib64:
/opt/mqm/java/lib). Implemented to support z/OS using an ENVFILE."/>
</property>
<property name="shell">
<property-ui type="textBox"
label="Shell"
default-value="/bin/sh"
description="Path to your shell executable file." hidden="true"/>
</property>
</properties>
<post-processing><![CDATA[
if (properties.get("exitCode") != 0) {
Expand All @@ -2300,7 +2371,8 @@
<command program="${GROOVY_HOME}/bin/groovy">
<arg value="-cp"/>
<arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
<arg file="start_broker.groovy"/>
<arg file="mqsi_profile_wrapper.groovy"/>
<arg value="start_broker.groovy"/>
<arg file="${PLUGIN_INPUT_PROPS}"/>
<arg file="${PLUGIN_OUTPUT_PROPS}"/>
</command>
Expand All @@ -2319,6 +2391,29 @@
label="Integration Node (Broker)"
description="The name of the integration node to create."/>
</property>
<property name="mqsiprofile">
<property-ui type="textBox"
label="MQSIPROFILE Executable"
default-value="${p?:resource/iib.mqsiprofile}"
description="The absolute path to the mqsiprofile executable on your IIB server.
Specifying this value will initialize your command environment. This
value is required if your command environment is not initialized on
startup through a script such as `.bashrc`."/>
</property>
<property name="env">
<property-ui type="textAreaBox"
label="Environment Variables"
default-value="${p?:resource/iib.environment}"
description="A file or list containing property entries, with each entry delimited by newlines.
Entries must be in the form 'VAR=VALUE' (i.e. java.library.path=/opt/mqm/java/lib64:
/opt/mqm/java/lib). Implemented to support z/OS using an ENVFILE."/>
</property>
<property name="shell">
<property-ui type="textBox"
label="Shell"
default-value="/bin/sh"
description="Path to your shell executable file." hidden="true"/>
</property>
</properties>
<post-processing><![CDATA[
if (properties.get("exitCode") != 0) {
Expand All @@ -2331,7 +2426,8 @@
<command program="${GROOVY_HOME}/bin/groovy">
<arg value="-cp"/>
<arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar"/>
<arg file="stop_broker.groovy"/>
<arg file="mqsi_profile_wrapper.groovy"/>
<arg value="stop_broker.groovy"/>
<arg file="${PLUGIN_INPUT_PROPS}"/>
<arg file="${PLUGIN_OUTPUT_PROPS}"/>
</command>
Expand Down
34 changes: 34 additions & 0 deletions src/main/zip/upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -914,5 +914,39 @@
</migrate>
<migrate to-version="46">
</migrate>
<migrate to-version="47">
<migrate-command name="Create Integration Node">
<migrate-properties>
<migrate-property name="jarPath" default="${p?:resource/iib.jarPath}"/>
<migrate-property name="mqsiprofile" default="${p?:resource/iib.mqsiprofile}"/>
<migrate-property name="env" default="${p?:resource/iib.environment}"/>
<migrate-property name="shell" default="/bin/sh"/>
</migrate-properties>
</migrate-command>
<migrate-command name="Stop Integration Node">
<migrate-properties>
<migrate-property name="jarPath" default="${p?:resource/iib.jarPath}"/>
<migrate-property name="mqsiprofile" default="${p?:resource/iib.mqsiprofile}"/>
<migrate-property name="env" default="${p?:resource/iib.environment}"/>
<migrate-property name="shell" default="/bin/sh"/>
</migrate-properties>
</migrate-command>
<migrate-command name="Start Integration Node">
<migrate-properties>
<migrate-property name="jarPath" default="${p?:resource/iib.jarPath}"/>
<migrate-property name="mqsiprofile" default="${p?:resource/iib.mqsiprofile}"/>
<migrate-property name="env" default="${p?:resource/iib.environment}"/>
<migrate-property name="shell" default="/bin/sh"/>
</migrate-properties>
</migrate-command>
<migrate-command name="Delete Integration Node">
<migrate-properties>
<migrate-property name="jarPath" default="${p?:resource/iib.jarPath}"/>
<migrate-property name="mqsiprofile" default="${p?:resource/iib.mqsiprofile}"/>
<migrate-property name="env" default="${p?:resource/iib.environment}"/>
<migrate-property name="shell" default="/bin/sh"/>
</migrate-properties>
</migrate-command>
</migrate>
</plugin-upgrade>