Troubles with beforeScript and afterScript

7 views
Skip to first unread message

matz...@googlemail.com

unread,
Aug 10, 2009, 11:13:06 AM8/10/09
to fredistrano-discuss
Hi,

i need another .htaccess File an an additional .htusers File in the
root of my deployes directoy.
So I thought it could be possible to copy these 2 Files in the
afterScript like this:

#!/bin/sh
PATHPRD= /kunden/92160_74076/testintranet
PATHTMP= /kunden/92160_74076/fredistrano/files/tmp/
TestIntranetEasySports/tmpDir

# copy prod version of .htaccess and htusers

cp -vf ${PATHPRD}/toCopy/.htaccessroot ${PATHPRD}/.htaccess
cp -vf ${PATHPRD}/toCopy/.htusers ${PATHPRD}/.htusers
cp -vf ${PATHPRD}/toCopy/.htaccesswebroot ${PATHPRD}/app/
webroot/.htaccess

Notice the PATHPRD twice...

But this doesn´t work...

Could someone tell what I´m doin wrong???

euphrate_ylb

unread,
Aug 10, 2009, 11:35:40 AM8/10/09
to fredistrano-discuss
Hi,

In order to help you more efficiently, could you provide us some more
details:
- deployment method your are using (normal/fast deploy),
- SVN option (export or update),
- and more importantly, the generated output (XML log) of the failed
deployment(s).

Regards,

Yann LE BLEVEC

On Aug 10, 5:13 pm, "matzeh...@googlemail.com"

matz...@googlemail.com

unread,
Aug 10, 2009, 11:43:29 AM8/10/09
to fredistrano-discuss
Hi Yann,

- deployment method is Normal (i also tried the "fast mode")..
- SVN Option is update.

There are some errors that some notempty directories could be
deleted.. but nothing about a failure in the afterscript

and here is the LOG:

steps>
-
<step name="export" uuid="">
-
<timePeriod>
<start timezone="Europe/Berlin">2009-08-10T17:29:25+02:00</start>
<end timezone="Europe/Berlin">2009-08-10T17:29:27+02:00</end>
<elapsed unit="seconds">2.032</elapsed>
</timePeriod>
<user>1</user>
-
<actions>
-
<action name="update" type="SvnAction">
-
<description>
/kunden/92160_74076/fredistrano/files/tmp/TestIntranetEasySports/
tmpDir/
</description>
-
<timePeriod>
<start timezone="Europe/Berlin">2009-08-10T17:29:25+02:00</start>
<end timezone="Europe/Berlin">2009-08-10T17:29:27+02:00</end>
<elapsed unit="seconds">2.028</elapsed>
</timePeriod>
-
<job>
<command>svn update --non-interactive 2>&1</command>
<result>At revision 135.
</result>
</job>
</action>
-
<action name="loadConfig" type="PhpAction">
-
<timePeriod>
<start timezone="Europe/Berlin">2009-08-10T17:29:27+02:00</start>
<end timezone="Europe/Berlin">2009-08-10T17:29:27+02:00</end>
<elapsed unit="seconds">0</elapsed>
</timePeriod>
-
<job>
<command/>
<result/>
</job>
</action>
</actions>
</step>
-
<step name="synchronize" uuid="">
-
<timePeriod>
<start timezone="Europe/Berlin">2009-08-10T17:29:32+02:00</start>
<end timezone="Europe/Berlin">2009-08-10T17:29:32+02:00</end>
<elapsed unit="seconds">0.111</elapsed>
</timePeriod>
<user>1</user>
-
<actions>
-
<action name="loadConfig" type="PhpAction">
-
<timePeriod>
<start timezone="Europe/Berlin">2009-08-10T17:29:32+02:00</start>
<end timezone="Europe/Berlin">2009-08-10T17:29:32+02:00</end>
<elapsed unit="seconds">0</elapsed>
</timePeriod>
-
<job>
<command/>
<result/>
</job>
</action>
-
<action name="create" type="FS">
<description>Directory: /kunden/92160_74076/testintranet/</
description>
-
<timePeriod>
<start timezone="Europe/Berlin">2009-08-10T17:29:32+02:00</start>
<end timezone="Europe/Berlin">2009-08-10T17:29:32+02:00</end>
<elapsed unit="seconds">0.001</elapsed>
</timePeriod>
-
<job>
<command/>
<result/>
</job>
</action>
-
<action name="synchronizeContent" type="ShellAction">
-
<description>
Synchronizing /kunden/92160_74076/fredistrano/files/tmp/
TestIntranetEasySports/tmpDir/ with /kunden/92160_74076/testintranet/
</description>
-
<timePeriod>
<start timezone="Europe/Berlin">2009-08-10T17:29:32+02:00</start>
<end timezone="Europe/Berlin">2009-08-10T17:29:32+02:00</end>
<elapsed unit="seconds">0.105</elapsed>
</timePeriod>
-
<job>
-
<command>
rsync -rtvO --delete --exclude-from=/kunden/92160_74076/fredistrano/
files/tmp/TestIntranetEasySports/exclude_file.txt /kunden/92160_74076/
fredistrano/files/tmp/TestIntranetEasySports/tmpDir/ /kunden/
92160_74076/testintranet/ 2>&1
</command>
-
<result>
sending incremental file list
app/config/database.prd.php
cannot delete non-empty directory: app/tmp/sessions
cannot delete non-empty directory: app/tmp/logs
cannot delete non-empty directory: app/tmp/cache
cannot delete non-empty directory: app/webroot/files

sent 42945 bytes received 278 bytes 86446.00 bytes/sec
total size is 12852668 speedup is 297.36
</result>
</job>
</action>
-
<action name="createFilesListToChmod" type="PhpAction">
<description>files_to_chmod.txt and dir_to_chmod.txt</description>
-
<timePeriod>
<start timezone="Europe/Berlin">2009-08-10T17:29:32+02:00</start>
<end timezone="Europe/Berlin">2009-08-10T17:29:32+02:00</end>
<elapsed unit="seconds">0</elapsed>
</timePeriod>
-
<job>
<command/>
<result/>
</job>
</action>
</actions>
</step>
</steps>

euphrate_ylb

unread,
Aug 10, 2009, 12:38:32 PM8/10/09
to fredistrano-discuss
Thanks, I ll try to reproduce your problem.

At first glance, the after script doesn't seem to be executed at all;
otherwise it would have been logged. Do you have any indication that
your script is being executed (e.g. other shell commands are running
correctly) ?

Yann

On Aug 10, 5:43 pm, "matzeh...@googlemail.com"
Reply all
Reply to author
Forward
0 new messages