Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Calling Multiple OD scripts in one .ipl
System
Hi All,
Please guide me how can I add an IF condition to the following script which calls another script upon the success of one script.
here is the snippet:
my($tmplfilePathFn)="$OD_DIR/conf/my_opendeploy_test_WITH_DD.xml";
if ( ! (-r "$tmplfilePathFn") ) {
# -- Template file can not be accessed. Call back the task. Die.
my $comment = "Can't access the OpenDeploy template file, '$tmplfilePathFn'";
callBackAndDie($task, 1, $comment);
}
my $areaPath = $workarea;
if (! $testing ) {
$areaPath = $iwmount . $workarea;
}
# The path to TeamSite Perl.
my $iwperl = TeamSite::Config::iwgethome() . "/iw-perl/bin/iwperl";
my $deploy_cmd = "$iwperl $OD_DIR/solutions/perl/iwodstart.ipl my_opendeploy_test_WITH_DD -k area=$areaPath -k filelist=$filelist -k useNode=$useNode -k targetArea=$targetArea -inst $taskid ";
debug("$dbgInfo","deploy_cmd = '$deploy_cmd'\n");
my $resultsfile= "$iwhome/tmp/results.$wfid";
my $results = `$deploy_cmd > $resultsfile`;
open (RESULTS, "<$resultsfile");
while (<RESULTS>)
{
$results .= $_;
}
close RESULTS;
unlink($resultsfile);
$results =~ s|\n||;
debug("$dbgInfo", "results = '$results'\n");
my $comment;
if ($results =~ m|Status: Completed|)
{
$callback_result = 0;
$comment = " OpenDeploy SUCCESS.\n";
debug("$dbgInfo","$comment");
}
elsif ($results =~ m|Status: Failed|)
{
$callback_result = 1;
$comment = " OpenDeploy FAILED.\n";
debug("$dbgInfo","$comment");
}
else
{
$callback_result = 1;
$comment = " OpenDeploy Status Unknown. FAILED.\n";
debug("$dbgInfo","$comment");
}
.
.
.
.
the requirement:
Upon the succesful deployment of my_opendeploy_test_WITH_DD.xml another script called my_opendeploy_test_WITH_DD.xml should be called.
Your earliest help is highly appreciated.
Thanks in Advance.
Find more posts tagged with
Comments
There are no comments yet