Author |
Message
|
remocx |
Posted: Thu Jun 06, 2013 1:25 am Post subject: How to set a condition in build script |
|
|
Novice
Joined: 21 Dec 2012 Posts: 13
|
Can we add a condition in build script , if env.DEPLOY_ENV tag value is either T(test) or I(integration) then only certain message flows must get deployed to Execution group. for Q(Quality) & P(Production) the deployment should not happen.
How Do I set this condition in the build script?  |
|
Back to top |
|
 |
kash3338 |
Posted: Thu Jun 06, 2013 2:08 am Post subject: Re: How to set a condition in build script |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
remocx wrote: |
Can we add a condition in build script , if env.DEPLOY_ENV tag value is either T(test) or I(integration) then only certain message flows must get deployed to Execution group. for Q(Quality) & P(Production) the deployment should not happen.
How Do I set this condition in the build script?  |
What is the scripting language? It is possible to do this in almost all of the scripting languages. |
|
Back to top |
|
 |
remocx |
Posted: Thu Jun 06, 2013 2:16 am Post subject: |
|
|
Novice
Joined: 21 Dec 2012 Posts: 13
|
The scripting language is XML. Need to set a condition that checks for the environment in which the project is deployed. If environment is TEST or INTEGRATION, then the deployment must occur else the deployment should not occur |
|
Back to top |
|
 |
kash3338 |
Posted: Thu Jun 06, 2013 2:25 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
remocx wrote: |
The scripting language is XML. |
XML cannot be your scripting language. How do you do your deployments?
I guess you pass a XML message to some application which takes care of deployments and in your XML you have a tag named DEPLOY_ENV. Where do you pass this XML to? Is a ANT script referring this XML or any other Java application? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Jun 06, 2013 4:04 am Post subject: Re: How to set a condition in build script |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
remocx wrote: |
Can we add a condition in build script , if env.DEPLOY_ENV tag value is either T(test) or I(integration) then only certain message flows must get deployed to Execution group. for Q(Quality) & P(Production) the deployment should not happen.
How Do I set this condition in the build script? |
I think what you're really needing to do is have separate bars. Put the flows that do not need to go to Prod in a separate bar. Deploy both bars to Test but only the one to Prod. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
ganesh |
Posted: Thu Jun 06, 2013 6:12 am Post subject: |
|
|
Master
Joined: 18 Jul 2010 Posts: 294
|
|
Back to top |
|
 |
stevarg |
Posted: Thu Jun 06, 2013 6:33 am Post subject: |
|
|
Novice
Joined: 20 Nov 2012 Posts: 24
|
This is again for ANT.
<target name "xyz" if="${var}">
</target>
This target would be executed only if var results in some value.
If there is no value the target is ignored..
You could set the value of this variable in cases where u want to deploy the code and leave it blank in cases where you dont want to deploy the code...
Not sure if ANT supports conditions to check for value of a variable and execute some tasks. |
|
Back to top |
|
 |
|