ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker SupportIIBv10 Jenkins Auto Build Mqsiprofile Issue

Post new topicReply to topic
IIBv10 Jenkins Auto Build Mqsiprofile Issue View previous topic :: View next topic
Author Message
SandiSan
PostPosted: Wed Mar 16, 2016 9:07 am Post subject: IIBv10 Jenkins Auto Build Mqsiprofile Issue Reply with quote

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
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Wed Mar 16, 2016 9:11 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17386

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.
_________________
Read, Think, Try, Repeat
Back to top
View user's profile Send private message
SandiSan
PostPosted: Wed Mar 16, 2016 9:22 am Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Wed Mar 16, 2016 9:41 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17386

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.
_________________
Read, Think, Try, Repeat
Back to top
View user's profile Send private message
mpong
PostPosted: Wed Mar 16, 2016 10:13 am Post subject: Reply with quote

Centurion

Joined: 22 Jan 2010
Posts: 108

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
View user's profile Send private message
Gralgrathor
PostPosted: Wed Mar 16, 2016 12:32 pm Post subject: Reply with quote

Master

Joined: 23 Jul 2009
Posts: 278

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
View user's profile Send private message Send e-mail
ajpaton
PostPosted: Fri Apr 01, 2016 12:44 am Post subject: Reply with quote

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
View user's profile Send private message
Esa
PostPosted: Sun Apr 03, 2016 3:37 am Post subject: Re: IIBv10 Jenkins Auto Build Mqsiprofile Issue Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1372
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
View user's profile Send private message
mqjeff
PostPosted: Mon Apr 04, 2016 5:02 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17386

Which path?

The path to the binary? The path to one of the files you are passing to mqsapplybaroverride?
_________________
Read, Think, Try, Repeat
Back to top
View user's profile Send private message
tgkumar
PostPosted: Wed Sep 06, 2017 7:22 am Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportIIBv10 Jenkins Auto Build Mqsiprofile Issue
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.