Capistrano 部署命名空间

发布于 2024-12-20 23:18:52 字数 148 浏览 4 评论 0原文

所有 capistrano 文档似乎都表明有一个默认命名空间“部署”,其中包含一些标准任务,例如安装、更新代码、重新启动等。但是当我执行 cap -T 时,它只显示我定义的任务,而不显示部署任务。我还需要做其他事情来启用部署任务吗?我使用的是 capistrano 版本 2.9.0

All capistrano documentation seems to suggest that there is a default namespace "deploy" with some standard tasks like setup, update_code, restart etc. But when I do cap -T it only shows the tasks that I have defined and not the deploy tasks. Do I need to do anything else to enable the deploy tasks. I am using capistrano version 2.9.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

悲喜皆因你 2024-12-27 23:18:52

mbp:cms Bladeyu [master] $ cap -T

cap bundle:install           # Install the current Bundler environment.
cap deploy                   # Deploys your project.
cap deploy:assets:clean      # Run the asset clean rake task.
cap deploy:assets:precompile # Run the asset precompilation rake task.
cap deploy:check             # Test deployment dependencies.
cap deploy:cleanup           # Clean up old releases.
cap deploy:cold              # Deploys and starts a `cold' application.
cap deploy:migrate           # Run the migrate rake task.
cap deploy:migrations        # Deploy and run pending migrations.
cap deploy:pending           # Displays the commits since your last deploy.
cap deploy:pending:diff      # Displays the `diff' since your last deploy.
cap deploy:rollback          # Rolls back to a previous version and restarts.
cap deploy:rollback:code     # Rolls back to the previously deployed version.
cap deploy:setup             # Prepares one or more servers for deployment.
cap deploy:symlink           # Updates the symlink to the most recently deplo...
cap deploy:update            # Copies your project and updates the symlink.
cap deploy:update_code       # Copies your project to the remote servers.
cap deploy:upload            # Copy files to the currently deployed version.
cap deploy:web:disable       # Present a maintenance page to visitors.
cap deploy:web:enable        # Makes the application web-accessible again.
cap invoke                   # Invoke a single command on the remote servers.
cap shell                    # Begin an interactive Capistrano session.
cap whenever:clear_crontab   # Clear application's crontab entries using When...
cap whenever:update_crontab  # Update application's crontab entries using Whe...


Some tasks were not listed, either because they have no description,
or because they are only used internally by other tasks. To see all
tasks, type `cap -vT'.

Extended help may be available for these tasks.
Type `cap -e taskname' to view it.

mbp:cms Bladeyu [master] $ 宝石列表 capistrano

*** LOCAL GEMS ***

capistrano (2.9.0)

mbp:cms Bladeyu [master] $ cap -vT

cap assets:cleanup           # 
cap assets:precompile        # 
cap assets:redigest          # 
cap bundle:install           # Install the current Bundler environment.
cap custom_symlink           # 
cap deploy                   # Deploys your project.
cap deploy:assets:clean      # Run the asset clean rake task.
cap deploy:assets:precompile # Run the asset precompilation rake task.
cap deploy:assets:symlink    # [internal] This task will set up a symlink to ...
cap deploy:check             # Test deployment dependencies.
cap deploy:cleanup           # Clean up old releases.
cap deploy:cold              # Deploys and starts a `cold' application.
cap deploy:finalize_update   # [internal] Touches up the released code.
cap deploy:migrate           # Run the migrate rake task.
cap deploy:migrations        # Deploy and run pending migrations.
cap deploy:pending           # Displays the commits since your last deploy.
cap deploy:pending:diff      # Displays the `diff' since your last deploy.
cap deploy:restart           # 
cap deploy:rollback          # Rolls back to a previous version and restarts.
cap deploy:rollback:cleanup  # [internal] Removes the most recently deployed ...
cap deploy:rollback:code     # Rolls back to the previously deployed version.
cap deploy:rollback:revision # [internal] Points the current symlink at the p...
cap deploy:setup             # Prepares one or more servers for deployment.
cap deploy:start             # 
cap deploy:stop              # 
cap deploy:symlink           # Updates the symlink to the most recently deplo...
cap deploy:update            # Copies your project and updates the symlink.
cap deploy:update_code       # Copies your project to the remote servers.
cap deploy:upload            # Copy files to the currently deployed version.
cap deploy:web:disable       # Present a maintenance page to visitors.
cap deploy:web:enable        # Makes the application web-accessible again.
cap invoke                   # Invoke a single command on the remote servers.
cap precompile_trace         # 
cap setup_file_tree          # 
cap shell                    # Begin an interactive Capistrano session.
cap whenever:clear_crontab   # Clear application's crontab entries using When...
cap whenever:update_crontab  # Update application's crontab entries using Whe...

Extended help may be available for these tasks.
Type `cap -e taskname' to view it.

mbp:cms bladeyu [master] $ cap -T

cap bundle:install           # Install the current Bundler environment.
cap deploy                   # Deploys your project.
cap deploy:assets:clean      # Run the asset clean rake task.
cap deploy:assets:precompile # Run the asset precompilation rake task.
cap deploy:check             # Test deployment dependencies.
cap deploy:cleanup           # Clean up old releases.
cap deploy:cold              # Deploys and starts a `cold' application.
cap deploy:migrate           # Run the migrate rake task.
cap deploy:migrations        # Deploy and run pending migrations.
cap deploy:pending           # Displays the commits since your last deploy.
cap deploy:pending:diff      # Displays the `diff' since your last deploy.
cap deploy:rollback          # Rolls back to a previous version and restarts.
cap deploy:rollback:code     # Rolls back to the previously deployed version.
cap deploy:setup             # Prepares one or more servers for deployment.
cap deploy:symlink           # Updates the symlink to the most recently deplo...
cap deploy:update            # Copies your project and updates the symlink.
cap deploy:update_code       # Copies your project to the remote servers.
cap deploy:upload            # Copy files to the currently deployed version.
cap deploy:web:disable       # Present a maintenance page to visitors.
cap deploy:web:enable        # Makes the application web-accessible again.
cap invoke                   # Invoke a single command on the remote servers.
cap shell                    # Begin an interactive Capistrano session.
cap whenever:clear_crontab   # Clear application's crontab entries using When...
cap whenever:update_crontab  # Update application's crontab entries using Whe...


Some tasks were not listed, either because they have no description,
or because they are only used internally by other tasks. To see all
tasks, type `cap -vT'.

Extended help may be available for these tasks.
Type `cap -e taskname' to view it.

mbp:cms bladeyu [master] $ gem list capistrano

*** LOCAL GEMS ***

capistrano (2.9.0)

mbp:cms bladeyu [master] $ cap -vT

cap assets:cleanup           # 
cap assets:precompile        # 
cap assets:redigest          # 
cap bundle:install           # Install the current Bundler environment.
cap custom_symlink           # 
cap deploy                   # Deploys your project.
cap deploy:assets:clean      # Run the asset clean rake task.
cap deploy:assets:precompile # Run the asset precompilation rake task.
cap deploy:assets:symlink    # [internal] This task will set up a symlink to ...
cap deploy:check             # Test deployment dependencies.
cap deploy:cleanup           # Clean up old releases.
cap deploy:cold              # Deploys and starts a `cold' application.
cap deploy:finalize_update   # [internal] Touches up the released code.
cap deploy:migrate           # Run the migrate rake task.
cap deploy:migrations        # Deploy and run pending migrations.
cap deploy:pending           # Displays the commits since your last deploy.
cap deploy:pending:diff      # Displays the `diff' since your last deploy.
cap deploy:restart           # 
cap deploy:rollback          # Rolls back to a previous version and restarts.
cap deploy:rollback:cleanup  # [internal] Removes the most recently deployed ...
cap deploy:rollback:code     # Rolls back to the previously deployed version.
cap deploy:rollback:revision # [internal] Points the current symlink at the p...
cap deploy:setup             # Prepares one or more servers for deployment.
cap deploy:start             # 
cap deploy:stop              # 
cap deploy:symlink           # Updates the symlink to the most recently deplo...
cap deploy:update            # Copies your project and updates the symlink.
cap deploy:update_code       # Copies your project to the remote servers.
cap deploy:upload            # Copy files to the currently deployed version.
cap deploy:web:disable       # Present a maintenance page to visitors.
cap deploy:web:enable        # Makes the application web-accessible again.
cap invoke                   # Invoke a single command on the remote servers.
cap precompile_trace         # 
cap setup_file_tree          # 
cap shell                    # Begin an interactive Capistrano session.
cap whenever:clear_crontab   # Clear application's crontab entries using When...
cap whenever:update_crontab  # Update application's crontab entries using Whe...

Extended help may be available for these tasks.
Type `cap -e taskname' to view it.
呢古 2024-12-27 23:18:52

项目根目录中是否有名为 Capfile 的文件?
我的如下

load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy'

do you have a file named Capfile in a project root directory?
mine follows

load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文