Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems that some tasks dit not run #10

Closed
2bedom opened this issue Apr 9, 2014 · 14 comments
Closed

Seems that some tasks dit not run #10

2bedom opened this issue Apr 9, 2014 · 14 comments
Assignees

Comments

@2bedom
Copy link

2bedom commented Apr 9, 2014

When i try adeploy it seems that some tasks from
https://github.com/capistrano/symfony/blob/master/lib/capistrano/tasks/symfony.rake

did not run propperly..
1.) no bootstrap is created
2.) the permissions were not set

set :file_permissions_paths,         [fetch(:app_path),fetch(:log_path), fetch(:cache_path)]
set :webserver_user,        "www-data"
set :permission_method,     :acl
set :use_set_permissions,   true

if i put this in my deploy.rb file

#if i use this one with a custom invoke it works..
set :file_permissions_users, ["www-data"]
before "deploy:updated", "deploy:set_permissions:acl"
#copied task to my rb file
before "symfony:cache:warmup", "deploy:build_bootstrap"

i also couldnt find were you use this var

set :webserver_user,        "www-data"

my whole deploy.rb looks like this

#config valid only for Capistrano 3.1
lock '3.1.0'
#General Settings
set :application, 'SymfonyProject'
set :repo_url, 'git@XXXX/xxx.git'
set :scm,         :git
set :keep_releases,  3
set :use_sudo,     false
#Symfony Settings
#Symfony environment
set :symfony_env,  "prod"
#Symfony application path
set :app_path,              "app"
#Symfony web path
set :web_path,              "web"
#Symfony log path
set :log_path,              fetch(:app_path) + "/logs"
#Symfony cache path
set :cache_path,            fetch(:app_path) + "/cache"
#Symfony config file path
set :app_config_path,       fetch(:app_path) + "/config"
#Controllers to clear
set :controllers_to_clear, ["app_*.php"]
#Files that need to remain the same between deploys
set :linked_files,          []
#Dirs that need to remain the same between deploys (shared dirs)
set :linked_dirs,           [fetch(:log_path), fetch(:web_path) + "/uploads"]
#Dirs that need to be writable by the HTTP Server (i.e. cache, log dirs)
set :file_permissions_paths,         [fetch(:app_path),fetch(:log_path), fetch(:cache_path)]
set :file_permissions_users, ["www-data"]
#Name used by the Web Server (i.e. www-data for Apache)
#set :webserver_user,    "www-data"
#Method used to set permissions (:chmod, :acl, or :chown)
#set :permission_method,     false
#Execute set permissions
#set :use_set_permissions,   false
before "deploy:updated", "deploy:set_permissions:acl"
before "symfony:cache:warmup", "deploy:build_bootstrap"
#Composer
set :composer_install_flags, "--no-dev --no-scripts --verbose --prefer-dist --optimize-autoloader --no-progress"
set :symfony_console_path, fetch(:app_path) + "/console"
set :symfony_console_flags, "--no-debug"
#Assets install
set :assets_install_path,   fetch(:web_path)
SSHKit.config.command_map[:composer] = "php composer.phar"
#the copied task from your file(deploy:build_bootstrap)

something wrong with this config ?

@mstrzele
Copy link
Contributor

mstrzele commented Apr 9, 2014

Can you paste your output from cap deploy?

@2bedom
Copy link
Author

2bedom commented Apr 9, 2014

cap develop deploy
 INFO [2970648a] Running /usr/bin/env mkdir -p /tmp/Project/ on dev-ci-runner-2
DEBUG [2970648a] Command: /usr/bin/env mkdir -p /tmp/Project/
 INFO [2970648a] Finished in 0.478 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/Project/git-ssh.sh 0.0%
 INFO Uploading /tmp/Project/git-ssh.sh 100.0%
 INFO [54b9e6de] Running /usr/bin/env chmod +x /tmp/Project/git-ssh.sh on dev-ci-runner-2
DEBUG [54b9e6de] Command: /usr/bin/env chmod +x /tmp/Project/git-ssh.sh
 INFO [54b9e6de] Finished in 0.023 seconds with exit status 0 (successful).
DEBUG [729ae6bf] Running /usr/bin/env git ls-remote [email protected]:development/Projectapp.git on dev-ci-runner-2
DEBUG [729ae6bf] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/Project/git-ssh.sh /usr/bin/env git ls-remote [email protected]:development/Projectapp.git )
DEBUG [729ae6bf]    Error reading response length from authentication socket.
DEBUG [729ae6bf]    e12762d9e3c82728c431d2eb790a899bc8d0a6e0    HEAD
DEBUG [729ae6bf]    de9084bfabbe1536241e7c126359bb834c8a040f    refs/heads/develop
DEBUG [729ae6bf]    e12762d9e3c82728c431d2eb790a899bc8d0a6e0    refs/heads/master
DEBUG [729ae6bf]    a56eb91c4f7f295d2791e957281deb7cce2afbb9    refs/tags/0.0.1
DEBUG [729ae6bf]    8b4d69dd5803225c08472e9a014f342d7a653a0d    refs/tags/0.0.1^{}
DEBUG [729ae6bf]    ccb1f9c0e566b0184678cb19dec23f94331cc520    refs/tags/0.0.2
DEBUG [729ae6bf]    f03c48e85cb94f886f49c6b70678f37bc529a65e    refs/tags/0.0.2^{}
DEBUG [729ae6bf]    7611938dfc582b9c8625cdfe95aa666f608df1a3    refs/tags/0.0.3
DEBUG [729ae6bf]    c3e7f661f849a51bb219937b582accb674db5ffd    refs/tags/0.0.3^{}
DEBUG [729ae6bf]    c1335fc873e4352ff6544e2cea2b146d4964cadf    refs/tags/0.0.4
DEBUG [729ae6bf]    be68676e688bdf685e8674e29029316041553c3c    refs/tags/0.0.4^{}
DEBUG [729ae6bf]    c7e4b87d26908566c21b87ff1303a1ae912d2578    refs/tags/0.0.5
DEBUG [729ae6bf]    e12762d9e3c82728c431d2eb790a899bc8d0a6e0    refs/tags/0.0.5^{}
DEBUG [729ae6bf]    Error reading response length from authentication socket.
DEBUG [729ae6bf] Finished in 0.583 seconds with exit status 0 (successful).
 INFO [0eaf6c00] Running /usr/bin/env mkdir -pv /home/ubuntu/Project_dev/shared /home/ubuntu/Project_dev/releases on dev-ci-runner-2
DEBUG [0eaf6c00] Command: /usr/bin/env mkdir -pv /home/ubuntu/Project_dev/shared /home/ubuntu/Project_dev/releases
 INFO [0eaf6c00] Finished in 0.010 seconds with exit status 0 (successful).
 INFO [0b4634f8] Running /usr/bin/env mkdir -pv /home/ubuntu/Project_dev/shared/app/logs /home/ubuntu/Project_dev/shared/web/uploads on dev-ci-runner-2
DEBUG [0b4634f8] Command: /usr/bin/env mkdir -pv /home/ubuntu/Project_dev/shared/app/logs /home/ubuntu/Project_dev/shared/web/uploads
 INFO [0b4634f8] Finished in 0.009 seconds with exit status 0 (successful).
DEBUG [f249c6b2] Running /usr/bin/env [ -f /home/ubuntu/Project_dev/repo/HEAD ] on dev-ci-runner-2
DEBUG [f249c6b2] Command: [ -f /home/ubuntu/Project_dev/repo/HEAD ]
DEBUG [f249c6b2] Finished in 0.006 seconds with exit status 0 (successful).
 INFO The repository mirror is at /home/ubuntu/Project_dev/repo
DEBUG [95cd3cb7] Running /usr/bin/env if test ! -d /home/ubuntu/Project_dev/repo; then echo "Directory does not exist '/home/ubuntu/Project_dev/repo'" 1>&2; false; fi on dev-ci-runner-2
DEBUG [95cd3cb7] Command: if test ! -d /home/ubuntu/Project_dev/repo; then echo "Directory does not exist '/home/ubuntu/Project_dev/repo'" 1>&2; false; fi
DEBUG [95cd3cb7] Finished in 0.006 seconds with exit status 0 (successful).
DEBUG [86d3ed9a] Running /usr/bin/env cd /home/ubuntu/Project_dev/repo && git rev-parse --short HEAD on dev-ci-runner-2
DEBUG [86d3ed9a] Command: cd /home/ubuntu/Project_dev/repo && git rev-parse --short HEAD
DEBUG [86d3ed9a]    e12762d
DEBUG [86d3ed9a] Finished in 0.009 seconds with exit status 0 (successful).
 INFO [6ec02e0b] Running /usr/bin/env git remote update on dev-ci-runner-2
DEBUG [6ec02e0b] Command: cd /home/ubuntu/Project_dev/repo && /usr/bin/env git remote update
DEBUG [6ec02e0b]    Fetching origin
DEBUG [6ec02e0b]    Fetching origin
DEBUG [6ec02e0b]    Error reading response length from authentication socket.
 INFO [6ec02e0b] Finished in 0.583 seconds with exit status 0 (successful).
DEBUG [f2044c95] Running /usr/bin/env cd /home/ubuntu/Project_dev/repo && git rev-parse --short HEAD on dev-ci-runner-2
DEBUG [f2044c95] Command: cd /home/ubuntu/Project_dev/repo && git rev-parse --short HEAD
DEBUG [f2044c95]    e12762d
DEBUG [f2044c95] Finished in 0.010 seconds with exit status 0 (successful).
DEBUG [9c841f26] Running /usr/bin/env if test ! -d /home/ubuntu/Project_dev/repo; then echo "Directory does not exist '/home/ubuntu/Project_dev/repo'" 1>&2; false; fi on dev-ci-runner-2
DEBUG [9c841f26] Command: if test ! -d /home/ubuntu/Project_dev/repo; then echo "Directory does not exist '/home/ubuntu/Project_dev/repo'" 1>&2; false; fi
DEBUG [9c841f26] Finished in 0.006 seconds with exit status 0 (successful).
 INFO [8ff7316a] Running /usr/bin/env mkdir -p /home/ubuntu/Project_dev/releases/20140409123251 on dev-ci-runner-2
DEBUG [8ff7316a] Command: cd /home/ubuntu/Project_dev/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/Project/git-ssh.sh /usr/bin/env mkdir -p /home/ubuntu/Project_dev/releases/20140409123251 )
 INFO [8ff7316a] Finished in 0.009 seconds with exit status 0 (successful).
 INFO [eeb63099] Running /usr/bin/env git archive develop | tar -x -C /home/ubuntu/Project_dev/releases/20140409123251 on dev-ci-runner-2
DEBUG [eeb63099] Command: cd /home/ubuntu/Project_dev/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/Project/git-ssh.sh /usr/bin/env git archive develop | tar -x -C /home/ubuntu/Project_dev/releases/20140409123251 )
 INFO [eeb63099] Finished in 0.084 seconds with exit status 0 (successful).
 INFO [a5929cc6] Running /usr/bin/env mkdir -pv /home/ubuntu/Project_dev/releases/20140409123251/app /home/ubuntu/Project_dev/releases/20140409123251/web on dev-ci-runner-2
DEBUG [a5929cc6] Command: /usr/bin/env mkdir -pv /home/ubuntu/Project_dev/releases/20140409123251/app /home/ubuntu/Project_dev/releases/20140409123251/web
 INFO [a5929cc6] Finished in 0.010 seconds with exit status 0 (successful).
DEBUG [d87d3f4a] Running /usr/bin/env [ -L /home/ubuntu/Project_dev/releases/20140409123251/app/logs ] on dev-ci-runner-2
DEBUG [d87d3f4a] Command: [ -L /home/ubuntu/Project_dev/releases/20140409123251/app/logs ]
DEBUG [d87d3f4a] Finished in 0.006 seconds with exit status 1 (failed).
DEBUG [64843b92] Running /usr/bin/env [ -d /home/ubuntu/Project_dev/releases/20140409123251/app/logs ] on dev-ci-runner-2
DEBUG [64843b92] Command: [ -d /home/ubuntu/Project_dev/releases/20140409123251/app/logs ]
DEBUG [64843b92] Finished in 0.006 seconds with exit status 1 (failed).
 INFO [0a12d760] Running /usr/bin/env ln -s /home/ubuntu/Project_dev/shared/app/logs /home/ubuntu/Project_dev/releases/20140409123251/app/logs on dev-ci-runner-2
DEBUG [0a12d760] Command: /usr/bin/env ln -s /home/ubuntu/Project_dev/shared/app/logs /home/ubuntu/Project_dev/releases/20140409123251/app/logs
 INFO [0a12d760] Finished in 0.009 seconds with exit status 0 (successful).
DEBUG [b43ff893] Running /usr/bin/env [ -L /home/ubuntu/Project_dev/releases/20140409123251/web/uploads ] on dev-ci-runner-2
DEBUG [b43ff893] Command: [ -L /home/ubuntu/Project_dev/releases/20140409123251/web/uploads ]
DEBUG [b43ff893] Finished in 0.006 seconds with exit status 1 (failed).
DEBUG [ee921f8b] Running /usr/bin/env [ -d /home/ubuntu/Project_dev/releases/20140409123251/web/uploads ] on dev-ci-runner-2
DEBUG [ee921f8b] Command: [ -d /home/ubuntu/Project_dev/releases/20140409123251/web/uploads ]
DEBUG [ee921f8b] Finished in 0.006 seconds with exit status 1 (failed).
 INFO [7f7661a7] Running /usr/bin/env ln -s /home/ubuntu/Project_dev/shared/web/uploads /home/ubuntu/Project_dev/releases/20140409123251/web/uploads on dev-ci-runner-2
DEBUG [7f7661a7] Command: /usr/bin/env ln -s /home/ubuntu/Project_dev/shared/web/uploads /home/ubuntu/Project_dev/releases/20140409123251/web/uploads
 INFO [7f7661a7] Finished in 0.008 seconds with exit status 0 (successful).
DEBUG [d7e47c83] Running /usr/bin/env if test ! -d /home/ubuntu/Project_dev/releases/20140409123251; then echo "Directory does not exist '/home/ubuntu/Project_dev/releases/20140409123251'" 1>&2; false; fi on dev-ci-runner-2
DEBUG [d7e47c83] Command: if test ! -d /home/ubuntu/Project_dev/releases/20140409123251; then echo "Directory does not exist '/home/ubuntu/Project_dev/releases/20140409123251'" 1>&2; false; fi
DEBUG [d7e47c83] Finished in 0.006 seconds with exit status 0 (successful).
 INFO [7d4ebc55] Running php composer.phar install --no-dev --no-scripts --verbose --prefer-dist --optimize-autoloader --no-progress on dev-ci-runner-2
DEBUG [7d4ebc55] Command: cd /home/ubuntu/Project_dev/releases/20140409123251 && php composer.phar install --no-dev --no-scripts --verbose --prefer-dist --optimize-autoloader --no-progress
DEBUG [7d4ebc55]    Loading composer repositories with package information
DEBUG [7d4ebc55]    Installing dependencies from lock file
DEBUG [7d4ebc55]      - Installing twig/twig (v1.15.1)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing symfony/symfony (v2.3.12)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing symfony/icu (v1.0.1)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing psr/log (1.0.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/lexer (v1.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/inflector (v1.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/collections (v1.2)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/cache (v1.3.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/annotations (v1.1.2)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/common (v2.4.1)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing behat/mink (v1.5.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing behat/mink-browserkit-driver (v1.1.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing phpunit/php-text-template (1.2.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing phpunit/phpunit-mock-objects (1.2.3)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing phpunit/php-timer (1.0.5)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing phpunit/php-file-iterator (1.3.4)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing phpunit/php-token-stream (1.2.2)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing phpunit/php-code-coverage (1.2.17)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing phpunit/phpunit (3.7.34)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]        Skipped installation of composer/bin/phpunit for package phpunit/phpunit: name conflicts with an existing file
DEBUG [7d4ebc55]      - Installing monolog/monolog (1.8.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing facebook/webdriver (v0.1)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing instaclick/php-webdriver (1.0.17)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]        Skipped installation of bin/webunit for package instaclick/php-webdriver: name conflicts with an existing file
DEBUG [7d4ebc55]      - Installing behat/mink-selenium2-driver (v1.1.1)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing guzzle/common (v3.8.1)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing guzzle/stream (v3.8.1)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing guzzle/parser (v3.8.1)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing guzzle/http (v3.8.1)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing fabpot/goutte (v1.0.5)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing behat/mink-goutte-driver (v1.0.9)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing codeception/codeception (1.8.0.1)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]        Skipped installation of codecept for package codeception/codeception: name conflicts with an existing file
DEBUG [7d4ebc55]      - Installing jdorn/sql-formatter (v1.2.17)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/dbal (2.3.4)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/doctrine-bundle (v1.2.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/data-fixtures (v1.0.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/doctrine-fixtures-bundle (dev-master ccd69d9)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/migrations (dev-master 46a031d)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/doctrine-migrations-bundle (dev-master f713838)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/mongodb (1.1.5)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/mongodb-odm (dev-master 8823138)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/mongodb-odm-bundle (dev-master ba17a28)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing doctrine/orm (2.3.5)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]        Skipped installation of bin/doctrine for package doctrine/orm: name conflicts with an existing file
DEBUG [7d4ebc55]        Skipped installation of bin/doctrine.php for package doctrine/orm: name conflicts with an existing file
DEBUG [7d4ebc55]      - Installing incenteev/composer-parameter-handler (v2.1.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing predis/predis (0.8.x-dev 83df2ef)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing sensio/distribution-bundle (v2.3.4)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing sensio/framework-extra-bundle (v2.3.4)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing sensio/generator-bundle (v2.3.4)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing snc/redis-bundle (dev-master 52549ac)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing kriswallsmith/assetic (v1.1.2)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing symfony/assetic-bundle (v2.3.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing symfony/monolog-bundle (v2.3.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing swiftmailer/swiftmailer (v5.1.0)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing symfony/swiftmailer-bundle (v2.3.7)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]      - Installing twig/extensions (v1.0.1)
DEBUG [7d4ebc55]        Loading from cache
DEBUG [7d4ebc55]        Extracting archive
DEBUG [7d4ebc55]    
DEBUG [7d4ebc55]    Generating optimized autoload files
 INFO [7d4ebc55] Finished in 5.135 seconds with exit status 0 (successful).
DEBUG [08ee63f5] Running /usr/bin/env if test ! -d /home/ubuntu/Project_dev/releases/20140409123251; then echo "Directory does not exist '/home/ubuntu/Project_dev/releases/20140409123251'" 1>&2; false; fi on dev-ci-runner-2
DEBUG [08ee63f5] Command: if test ! -d /home/ubuntu/Project_dev/releases/20140409123251; then echo "Directory does not exist '/home/ubuntu/Project_dev/releases/20140409123251'" 1>&2; false; fi
DEBUG [08ee63f5] Finished in 0.003 seconds with exit status 0 (successful).
 INFO [a0b4e6a5] Running /usr/bin/env cp /home/ubuntu/Project_dev/releases/20140409123251/app/config/parameters/parameters_dev.yml /home/ubuntu/Project_dev/releases/20140409123251/app/config/parameters.yml on dev-ci-runner-2
DEBUG [a0b4e6a5] Command: cd /home/ubuntu/Project_dev/releases/20140409123251 && /usr/bin/env cp /home/ubuntu/Project_dev/releases/20140409123251/app/config/parameters/parameters_dev.yml /home/ubuntu/Project_dev/releases/20140409123251/app/config/parameters.yml
 INFO [a0b4e6a5] Finished in 0.006 seconds with exit status 0 (successful).
DEBUG [2b7dc957] Running /usr/bin/env if test ! -d /home/ubuntu/Project_dev/releases/20140409123251; then echo "Directory does not exist '/home/ubuntu/Project_dev/releases/20140409123251'" 1>&2; false; fi on dev-ci-runner-2
DEBUG [2b7dc957] Command: if test ! -d /home/ubuntu/Project_dev/releases/20140409123251; then echo "Directory does not exist '/home/ubuntu/Project_dev/releases/20140409123251'" 1>&2; false; fi
DEBUG [2b7dc957] Finished in 0.003 seconds with exit status 0 (successful).
 INFO [ff8a1195] Running /usr/bin/env php /home/ubuntu/Project_dev/releases/20140409123251/app/console cache:warmup --quiet --no-interaction --env=prod  on dev-ci-runner-2
DEBUG [ff8a1195] Command: cd /home/ubuntu/Project_dev/releases/20140409123251 && /usr/bin/env php /home/ubuntu/Project_dev/releases/20140409123251/app/console cache:warmup --quiet --no-interaction --env=prod 
DEBUG [ff8a1195]    PHP Warning:  require_once(/home/ubuntu/Project_dev/releases/20140409123251/app/bootstrap.php.cache): failed to open stream: No such file or directory in /home/ubuntu/Project_dev/releases/20140409123251/app/console on line 10
DEBUG [ff8a1195]    PHP Fatal error:  require_once(): Failed opening required '/home/ubuntu/Project_dev/releases/20140409123251/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /home/ubuntu/Project_dev/releases/20140409123251/app/console on line 10

@2bedom
Copy link
Author

2bedom commented Apr 9, 2014

BTW the invoke command for symfony doesnt work eighter...

task :init_db do
    begin
       execute "test -f '#{shared_path}/dbinit.lock'"
    rescue Exception
       puts "--> DB:FIRST-RUN : -> create DB with doctrine"
       invoke 'symfony:command', 'doctrine:database:create'
       execute :touch, "#{shared_path}/dbinit.lock"
    end
  end

results in

--> DB:FIRST-RUN : -> create DB with doctrine
cap aborted!
Don't know how to build task 'symfony:command'
config/deploy.rb:103:in rescue in block (2 levels) in <top (required)>' config/deploy.rb:99:inblock (2 levels) in <top (required)>'
Tasks: TOP => deploy:init_db
(See full trace by running task with --trace)
The deploy has failed with an error: #<RuntimeError: Don't know how to build task 'symfony:command'>

seems that i have forgotten something ?!

@peterjmit
Copy link
Contributor

@2bedom Can you update your comments putting the code in proper fenced blocks it is very hard to read.

You can also put the output for deploy.rb in the same fenced blocks

@2bedom
Copy link
Author

2bedom commented Apr 9, 2014

@peterjmit done ;) sry ... was first report :)

@Lctrs
Copy link

Lctrs commented Apr 15, 2014

Hello,

Same here. I wrote a custom task to do an assetic:dump (I can make a PR if you're interested by this feature) on deploy.

namespace :symfony do
  namespace :assetic do
    desc "Dump assets to the filesystem"
    task :dump do
      invoke "symfony:command", "assetic:dump"
    end
  end

  after "deploy:updated", "symfony:assetic:dump"
end

But the assets are not deployed when I run the cap deploy command.
Here is a sample output with --trace option (wapiti:htaccess is another custom task) :

** Invoke symfony:cache:warmup (first_time)
** Execute symfony:cache:warmup
** Invoke symfony:command (first_time)
** Execute symfony:command
 ←[34mINFO←[0m [←[32m50b3983a←[0m] Running ←[33m←[1m/usr/bin/env php app/console cache:warmup --no-debug←[0m←[0m on ←[34mwapiti.acensi.eu←[0m
 ←[34mINFO←[0m [←[32m50b3983a←[0m] Finished in 10.440 seconds with exit status 0 (←[1m←[32msuccessful←[0m←[0m).
** Invoke deploy:clear_controllers (first_time)
** Execute deploy:clear_controllers
 ←[34mINFO←[0m [←[32mf19b55a2←[0m] Running ←[33m←[1m/usr/bin/env rm -f app_dev.php app.php←[0m←[0m on ←[34mwapiti.acensi.eu←[0m
 ←[34mINFO←[0m [←[32mf19b55a2←[0m] Finished in 0.040 seconds with exit status 0 (←[1m←[32msuccessful←[0m←[0m).
** Invoke deploy:assets:install (first_time)
** Execute deploy:assets:install
** Invoke symfony:command
** Invoke symfony:assetic:dump (first_time)
** Execute symfony:assetic:dump
** Invoke symfony:command
** Invoke wapiti:htaccess (first_time)
** Execute wapiti:htaccess
 ←[34mINFO←[0m [←[32m17da3c0a←[0m] Running ←[33m←[1m/usr/bin/env cp capistrano/files/htaccess_recette /home/sites_web/wapiti.acensi.eu/releases/20140415094621/web/.htaccess←[0m←[0m on ←[34mwapiti.acensi.eu←[0m
 ←[34mINFO←[0m [←[32m17da3c0a←[0m] Finished in 0.030 seconds with exit status 0 (←[1m←[32msuccessful←[0m←[0m).
** Invoke deploy:publishing (first_time)
** Execute deploy:publishing

As you can see, my command symfony:assetic:dump is called, it invokes without error symfony:command but it is not executed.

Interesting fact is that it works well for symfony:cache:warmup (which is defined in the same file as symfony:command) but not for deploy:assets:install (command provided by this lib - not defined in the same file as symfony:command).

PS : If I run cap symfony:assetic:dump, command runs as expected.
PS2 : My environment is Windows 7 x64 with latest Ruby 1.9.3.

@mstrzele
Copy link
Contributor

Same here. I wrote a custom task to do an assetic:dump (I can make a PR if you're interested by this feature) on deploy.

symofny:console is executed on servers with :app role. I just pasted your custom task and ran it without any problems.

symfony:cache:warmup can be run on any server with any role.

** Invoke symfony:assetic:dump (first_time)
** Execute symfony:assetic:dump
** Invoke symfony:command (first_time)
** Execute symfony:command
 INFO [6bee6cd4] Running /usr/bin/env php app/console assetic:dump --no-debug on www1.example.com
DEBUG [6bee6cd4] Command: cd /var/www/example/current && ( SYMFONY_ENV=test /usr/bin/env php app/console assetic:dump --no-debug )
DEBUG [639dbfdf] Finished in 0.528 seconds with exit status 0 (successful).
 INFO [3f6b2086] Running /usr/bin/env php app/console assetic:dump --no-debug on www2.example.com
DEBUG [3f6b2086] Command: cd /var/www/example/current && ( SYMFONY_ENV=test /usr/bin/env php app/console assetic:dump --no-debug )

@mstrzele
Copy link
Contributor

@2bedom Does the server, on which you're trying to run deploy:build_bootstrap and init_db, has :app role assigned?

@2bedom
Copy link
Author

2bedom commented Apr 16, 2014

@mstrzele the server i deploy too has all 3 roles :app, :web, :db

if i enclose the task by the on role xy i cant invoke symfons:run tasks...

@2bedom
Copy link
Author

2bedom commented Apr 16, 2014

ok seems that i have used the wrong gem Oo ... there is another gem on git hub but pretty same configuration ... omg..

all tasks now run, exept the assets task.. this task does not run

** Execute deploy:clear_controllers
DEBUG [9cfb5fcb] Running /usr/bin/env if test ! -d /home/ubuntu/project/releases/20140416130613/web; then echo "Directory does not exist '/home/ubuntu/project/releases/20140416130613/web'" 1>&2; false; fi on dev-ci-runner-2
DEBUG [9cfb5fcb] Command: if test ! -d /home/ubuntu/project/releases/20140416130613/web; then echo "Directory does not exist '/home/ubuntu/project/releases/20140416130613/web'" 1>&2; false; fi
DEBUG [9cfb5fcb] Finished in 0.003 seconds with exit status 0 (successful).
 INFO [2ffb2357] Running /usr/bin/env rm -f app_*.php on dev-ci-runner-2
DEBUG [2ffb2357] Command: cd /home/ubuntu/project/releases/20140416130613/web && ( SYMFONY_ENV=prod /usr/bin/env rm -f app_*.php )
 INFO [2ffb2357] Finished in 0.004 seconds with exit status 0 (successful).
** Invoke deploy:assets:install (first_time)
** Execute deploy:assets:install
** Invoke symfony:command 
** Invoke deploy:publishing (first_time)
** Invoke deploy:assets_install (first_time)

if i call cap develop deploy:assets:install by hand it works.. but not in flow ;( ...
i also tried another task(custum task) like the :migrate you show in the manual...and i placed it

before "deploy:publishing" , "deploy:assets_install"

but doesnt work eighter...
server is declared like this

server "dev-ubuntu", user: "ubuntu123", roles: %w{web app db}, :primary => true

It also seems that the permission tasks doesnt respect the property

set :webserver_user,        "www-data"

but it also doesnt respect the origin variable from the extension itself

set :file_permissions_users, ["www-data"]

any mistakes ?

@kingcrunch
Copy link

Same here, I miss my assets. I've found, that it doesn't go into the on roles :app at https://github.com/capistrano/symfony/blob/master/lib/capistrano/tasks/symfony_console.rake#L9 . release_roles :all (like in the referenced PR) doesn't work neither

@peterjmit peterjmit self-assigned this Apr 20, 2014
@Lctrs
Copy link

Lctrs commented Apr 23, 2014

Same here. I wrote a custom task to do an assetic:dump (I can make a PR if you're interested by this feature) on deploy.

symofny:console is executed on servers with :app role. I just pasted your custom task and ran it without any problems.

Server is declared like this :

server 'dev-wapiti', user: fetch(:ssh_user), roles: %w{web app db}

As you can see, it has the :app role.

Like 2bedom, if I call my task by hand, it works. But it doesn't work in the flow.
#9 doesn't resolve my problem.

@peterjmit
Copy link
Contributor

This should have been fixed by #17. Closing for now but will re-open if @Lctrs or @2bedom are still having issues

@daFish
Copy link

daFish commented Jun 27, 2014

@peterjmit I still have this issue. The task after 'deploy:updated', 'symfony:assetic:dump' isn't executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants