Author |
Message
|
SandiSan |
Posted: Wed Mar 16, 2016 9:07 am Post subject: IIBv10 Jenkins Auto Build Mqsiprofile Issue |
|
|
 Acolyte
Joined: 01 Apr 2006 Posts: 57 Location: Pune/India
|
Hello Everyone,
I am trying to have a Jenkins job created which will execute a ANT script for creating and overriding IIBv10 bar file properties.
IIB Ver : 10.0.0.3
Jenkins
Ant
Server : Windows 2012 Standard Edition
Problem I am facing is when it try to execute mqsiapplybaroverride I get an error [exec] The system cannot find the path specified.
Looks like we need to run mqsiprofile before executing mqsiapplybaroverride. I tried have a target for mqsiprofile and used antcall before executing mqsiapplybaroverride. Ant still complains "System cannot find the path specifiec"
<sequential>
<antcall target="setmqsiprofile" description="execute mqsiprofile command before executing mqsiapplybaroverride " />
<antcall target="mqsiapplybaroverride.modifybar">
<target name="setmqsiprofile" description="setting mqsiprofile">
<exec executable="${broker.home}\mqsiprofile.cmd" vmlauncher="false" spawn="false" failonerror="true"/>
</target>
If I run the same script from IIB command console it worked fine!! since mqsiprofile is already set in case of IIB command console.
Looking for suggestion how I can make the ANT/Jenkin aware of mqsiprofile when its run through Jenkins.
Do we need to do anything in Windows server level. I have even tried to set MQSI_WORKPATH and appended path where mqsiprofile reside.
Thanks
Sandisan |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 16, 2016 9:11 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
In general, you either need to have ant/maven/etc run it's scripts from within a shell that already has mqsiprofile applied, or you need to have all of the IIB/mqsi* commands inside scripts that source the mqsiprofile. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
SandiSan |
Posted: Wed Mar 16, 2016 9:22 am Post subject: |
|
|
 Acolyte
Joined: 01 Apr 2006 Posts: 57 Location: Pune/India
|
Thanks jeff for quick reply.
In case, of running it from Jenkins is there any setting? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 16, 2016 9:41 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I don't know how you tell Jenkins what shell to run a test under.
I don't know Jenkins.
It might be easier to put your commands in scripts.
If you are running your tests on the same machine, you can launch Jenkins from inside a shell that has mqsiprofile applied. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
mpong |
Posted: Wed Mar 16, 2016 10:13 am Post subject: |
|
|
Disciple
Joined: 22 Jan 2010 Posts: 164
|
you may need to call mqsiprofile from your script. Just try out.
CALL C:\Progra~1\IBM\MQSI\9.0.0.2\bin\mqsiprofile |
|
Back to top |
|
 |
Gralgrathor |
Posted: Wed Mar 16, 2016 12:32 pm Post subject: |
|
|
Master
Joined: 23 Jul 2009 Posts: 297
|
The examples I'm seeing online specify the full path for the executables. Perhaps it's not necessary to load the profile:
Code: |
<project name="project" default="run">
<target name="run" description="">
<property name="toolkit.home" value="C:\MessageBroker\700" />
<property name="ant.bars.basedir" value="C:\OutputDIR" />
<property name="bar.name" value="${ant.bars.basedir}\TestFlow.bar" />
<property name="workspace.dir" value="C:\workspaces\wmb" />
<antcall target="build" />
</target>
...
<target name="modifybar">
<echo message="Applying overrides in Broker Archive file - ${bar.name} " />
<echo
message="${toolkit.home}\mqsiapplybaroverride.exe
-b ${bar.name} -p ${bar.properties.name}" />
<exec executable="${toolkit.home}\mqsiapplybaroverride.exe" spawn="false">
<arg value="-b" />
<arg value="${bar.name}" />
<arg value="-p" />
<arg value="${bar.properties.name}" />
</exec>
<echo message="Completed apply overrides in Broker Archive file - ${bar.name}" />
</target>
|
But you need to ensure that your path is complete and correct. Try ${broker.home}/bin/mqsiapplystuff.exe?
From: http://www.ibm.com/developerworks/websphere/library/techarticles/1302_chatterjee/1302_chatterjee.html _________________ A measure of wheat for a penny, and three measures of barley for a penny; and see thou hurt not the oil and the wine. |
|
Back to top |
|
 |
ajpaton |
Posted: Fri Apr 01, 2016 12:44 am Post subject: |
|
|
Newbie
Joined: 01 Apr 2016 Posts: 1
|
If you're running any of the mqsi* administrative commands, you need to do this from an environment which has sourced the mqsiprofile script. They rely on environment variables being set beyond just the PATH, so you can't just fully qualify the executable name.
There is an article published in October 2015 (using IIB v10) of how to use Jenkins to run mqsicreatebar and mqsiapplybaroverride as part of an ANT build task, which shows one way to get a suitable environment within Jenkins.
It's on IBM's Integration Community but I can't post a link as I don't have enough posts here yet. (If you search for "jenkins continuous build integration bus" it's the top hit, at least for me)
Hope that is useful? |
|
Back to top |
|
 |
Esa |
Posted: Sun Apr 03, 2016 3:37 am Post subject: Re: IIBv10 Jenkins Auto Build Mqsiprofile Issue |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
SandiSan wrote: |
Problem I am facing is when it try to execute mqsiapplybaroverride I get an error [exec] The system cannot find the path specified.
Looks like we need to run mqsiprofile before executing mqsiapplybaroverride. I tried have a target for mqsiprofile and used antcall before executing mqsiapplybaroverride. Ant still complains "System cannot find the path specifiec"
|
I don't think running mqsiapplybaroverride needs mqsiprofile to be run.
So let's suppose your assumption is wrong.
Are you sure it's not the path to your bar file that cannot be found?
Do you build the bar file in a previous step or do you retrieve it from a repository?
Are you sure the build step runs where you think it runs? |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Apr 04, 2016 5:02 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Which path?
The path to the binary? The path to one of the files you are passing to mqsapplybaroverride? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
tgkumar |
Posted: Wed Sep 06, 2017 7:22 am Post subject: |
|
|
Newbie
Joined: 22 Jul 2013 Posts: 1
|
Hi All,
I'm also trying for the same scenario. I'm unable to run mqsideploy command as there profile is not being set.
SandiSan: Please post me the resolution if you found any. |
|
Back to top |
|
 |
|