Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
deployNRun task not starting
System
Hello All,
I must be missing something very obvious, but I'm unsuccessfull in getting a deploy-and-run script working.
What I'm trying to do must be very simple. I want to run a shell/perl/whatever script whenever a deployment comes in at the target server. So we made an extra entry in the opendeploy script:
<deployment transactional="yes" >
<execDeploymentTask useDefinition="blah" downRev="" >
<deployNRun>
<dnrFile location="target" when="after" state="always" mask="\.jsp$">
<script cmd="/iw-home/OpenDeployNG/etc/clear_cache_detest" as="root" where="" async="no" /></script>
</dnrFile>
</deployNRun>
</execDeploymentTask>
</deployment>
On the target, we're running linux with OpenDeploy 5.5.1 SP2. Patch 37316 is installed.
Om the source, our customer is running OpenDeploy 5.5.1 on NT. I'm not sure exactly which SP/patchlevel.
In the logfiles on the server side as well as on the client side, I can find no reference at all to opendeploy starting the script.
Can anybody point me into the right direction?
Thx!
-- Hans
Find more posts tagged with
Comments
Bill Klish
I took the following from page 208 of the OD 5.6 Admin Manual:
File-based Deploy and Run is not available for use with transactional deployments.
Since you are specifying transactional="yes" I assume OpenDeploy is ignoring the DnR script, but it would be helpful to state that in the log file.
Adam Stoller
Do you want the script to run once for each file deployed, or once for each *set of files* deployed (a.k.a. "a deployment")?
As has been pointed out - dnrFile won't work for transactional deployments - so you'll either have to change from using a transactional deployment or switch to running a single DNR script per deployment of a set of files.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
Erm, no, what I want to do is execute the script only once whenever a *.jsp file is uploaded inside a deployment. Also, it would be nice to do transactional deployments, because we'd like to be sure that all file versions will be in sync.
Are you saying that dnrDeploymentJob is a better way to solve that?
Thx!
-- Hans
Adam Stoller
I'm saying that you cannot run the script each time a *.jsp file is deployed (i.e. if you deploy 10 files, 5 of which are *.jsp - you cannot have this DNR invoked 5 times) if you are doing a transactional deployment.
dnrDeploymentJob probably won't help you either - last time I looked, it only ran scripts on the *source* side of the deployment - and I imagine you want to run your script on the *target* side.
You can probably use dnrDeployment and specify that it should run either before or after one of the various triggerpoints. The script could then parse the in-memory log or manifest file and do whatever it has to do for each of the *.jsp files that were deployed.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
image004.png
Migrateduser
OK, you're right. The "location" in dnrDeploymentJob suggest that you can specify where to run, but the manual specifies that the location is fixed at "source".
I'll try dnrDeployment first.
Thanks again!
-- Hans