问题:在我的build.xml中,我想对特定文件夹进行本地部署,但它不知何地部署了 正确,有时资产:转储在正确的文件夹上,有时它做错了 folder.e.g。在下面
资产:转储到错误的文件夹
本地部署:
11:06:17 [mkdir] Created dir: /srv/www/vhosts/forecast.autotest
11:06:17 [echo] Moving project to /srv/www/vhosts/forecast.autotest
11:06:20 [copy] Copying 11921 files to /srv/www/vhosts/forecast.autotest
11:06:22 [copy] Copied 2358 empty directories to 105 empty directories
under /srv/www/vhosts/forecast.autotest
11:06:22 [echo] Installing web assets
11:06:26 [exec] Installing assets using the hard copy option
11:06:26 [exec] Installing assets for Symfony\Bundle\FrameworkBundle
into web/bundles/framework
11:06:26 [exec] Installing assets for JordiLlonch\Bundle\CrudGeneratorBundle into web/bundles/jordillonchcrudgenerator
11:06:26 [exec] Installing assets for Niwa\EconecomBundle into web/bundles/niwaeconecom
11:06:26 [exec] Installing assets for Niwa\UsermanagementBundle into web/bundles/niwausermanagement
11:06:26 [exec] Installing assets for Niwa\UserinterfaceBundle into web/bundles/niwauserinterface
11:06:26 [exec] Installing assets for Niwa\UtilitiesBundle into web/bundles/niwautilities
11:06:26 [exec] Installing assets for Niwa\ForecastRestBundle into web/bundles/niwaforecastrest
11:06:26 [exec] Installing assets for Niwa\ForecastUIBundle into web/bundles/niwaforecastui
11:06:26 [exec] Installing assets for Niwa\ContentAPIBundle into web/bundles/niwacontentapi
11:06:26 [exec] Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution
11:06:26 [exec] Installing assets for Niwa\ThirdPartyBundle into web/bundles/niwathirdparty
11:06:27 [exec] Dumping all test assets.
11:06:27 [exec] Debug mode is on.
11:06:27 [exec]
11:06:32 [exec]
11:06:32 [exec]
11:06:32 [exec]
11:06:32 [exec] [RuntimeException]
11:06:32 [exec] The source file "/repository/jenkins/jobs/forecast/workspace/app/../web/bundles/niwaeconecom/less/main.less" does not exist.
11:06:32 [exec]
11:06:32 [exec]
11:06:32 [exec]
11:06:32 [exec] assetic:dump [--watch] [--force] [--period="..."] [write_to]
11:06:32 [exec]
11:06:32 [exec]
11:06:32 [exec] 11:06:31 [file+] /repository/jenkins/jobs/forecast/workspace/app/../web/js/b2dccab.js
11:06:32 [exec] 11:06:31 [file+] /repository/jenkins/jobs/forecast/workspace/app/../web/js/b2dccab_passwordCheck_1.js
11:06:32 [exec] 11:06:31 [file+] /repository/jenkins/jobs/forecast/workspace/app/../web/js/b2dccab_account_2.js
11:06:32 [exec] 11:06:31 [file+] /repository/jenkins/jobs/forecast/workspace/app/../web/js/3734ff1.js
11:06:32 [exec] 11:06:31 [file+] /repository/jenkins/jobs/forecast/workspace/app/../web/js/3734ff1_common_1.js
它会转到此文件夹:
[mkdir] Created dir: /srv/www/vhosts/forecast.autotest
15:31:40 [echo] Moving project to /srv/www/vhosts/forecast.autotest
15:31:42 [copy] Copying 10719 files to /srv/www/vhosts/forecast.autotest
15:31:45 [copy] Copied 2089 empty directories to 112 empty directories under /srv/www/vhosts/forecast.autotest
15:31:45 [echo] Installing web assets
15:31:49 [exec] Installing assets using the hard copy option
15:31:49 [exec] Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
15:31:49 [exec] Installing assets for JordiLlonch\Bundle\CrudGeneratorBundle into web/bundles/jordillonchcrudgenerator
15:31:49 [exec] Installing assets for Niwa\EconecomBundle into web/bundles/niwaeconecom
15:31:49 [exec] Installing assets for Niwa\UsermanagementBundle into web/bundles/niwausermanagement
15:31:49 [exec] Installing assets for Niwa\UserinterfaceBundle into web/bundles/niwauserinterface
15:31:50 [exec] Installing assets for Niwa\UtilitiesBundle into web/bundles/niwautilities
15:31:50 [exec] Installing assets for Niwa\ForecastRestBundle into web/bundles/niwaforecastrest
15:31:50 [exec] Installing assets for Niwa\ForecastUIBundle into web/bundles/niwaforecastui
15:31:50 [exec] Installing assets for Niwa\ContentAPIBundle into web/bundles/niwacontentapi
15:31:50 [exec] Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution
15:31:50 [exec] Installing assets for Niwa\ThirdPartyBundle into web/bundles/niwathirdparty
15:31:53 [exec] Dumping all test assets.
15:31:53 [exec] Debug mode is on.
15:31:53 [exec]
15:31:57 [exec] 15:31:57 [dir+] /srv/www/vhosts/forecast.autotest/app/../web/js
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/js/83950ce.js
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/js/83950ce_login_1.js
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/css/8892858.css
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/css/8892858_bootstrap_1.css
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/css/8892858_bootstrap-theme_2.css
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/js/b2dccab.js
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/js/b2dccab_passwordCheck_1.js
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/js/b2dccab_account_2.js
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/js/f9999e4.js
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/js/f9999e4_review_1.js
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/js/6917cbd.js
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/js/6917cbd_configure_1.js
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/js/f3d4596.js
15:31:57 [exec] 15:31:57 [file+] /srv/www/vhosts/forecast.autotest/app/../web/js/f3d4596_complete_1.js
所以基本上它假设要去/ srv / www / vhosts / ...但有时它会转到/ repository / jenkins / jobs /... < / p>
我的config.yml文件如下:
# Assetic Configuration
assetic:
debug: "%kernel.debug%"
use_controller: false
#bundles: [ ]
#java: /usr/bin/java
filters:
less:
node: %node%
node_paths: %node_paths%
apply_to: "\.less$"
cssrewrite: ~
uglifyjs2:
bin: %uglify_path%
我用来转储的命令是:
<echo message="Installing web assets" />
<exec dir="srv/www/vhosts/forecast.${BUILD_ENVIRONMENT}" executable="php"
failonerror="false">
<arg line="app/console assets:install web" />
</exec>