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

Creation of deploy-tag fails if local repo does not have the deployed commit #18

Open
roback opened this issue Jun 3, 2014 · 2 comments
Labels

Comments

@roback
Copy link
Member

roback commented Jun 3, 2014

Capistrano creates the deploy tags on the local repo and then pushes the tags to the remote.

If the commit that should be deployed does not exist in the local repo, the deployment tag cannot be created, because the commit has cannot be found.

INFO[3b0edb0e] Running /usr/bin/env git tag 2014-06-03__13_21_16__production 4042f21 -m "Deployed by Mattias Roback <[email protected]>" on localhost
cap aborted!
SSHKit::Command::Failed: git tag 2014-06-03__13_21_16__production 4042f21 -m "Deployed by Mattias Roback <[email protected]>" exit status: 32768
git tag 2014-06-03__13_21_16__production 4042f21 -m "Deployed by Mattias Roback <[email protected]>" stdout: Nothing written
git tag 2014-06-03__13_21_16__production 4042f21 -m "Deployed by Mattias Roback <[email protected]>" stderr: fatal: Failed to resolve '4042f21' as a valid ref.
/Users/mattias/.gem/ruby/2.1.2/gems/sshkit-1.5.1/lib/sshkit/command.rb:97:in `exit_status='
/Users/mattias/.gem/ruby/2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/local.rb:56:in `block in _execute'
/Users/mattias/.gem/ruby/2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/local.rb:37:in `tap'
/Users/mattias/.gem/ruby/2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/local.rb:37:in `_execute'
/Users/mattias/.gem/ruby/2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/local.rb:26:in `execute'
/Users/mattias/.gem/ruby/2.1.2/bundler/gems/capistrano-twingly-782c50a2aae9/lib/capistrano/twingly/tasks/tag_deploy_in_git.rake:12:in `block (3 levels) in <top (required)>'
/Users/mattias/.gem/ruby/2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/local.rb:14:in `instance_exec'
/Users/mattias/.gem/ruby/2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/local.rb:14:in `run'
/Users/mattias/.gem/ruby/2.1.2/gems/sshkit-1.5.1/lib/sshkit/dsl.rb:10:in `run_locally'
/Users/mattias/.gem/ruby/2.1.2/bundler/gems/capistrano-twingly-782c50a2aae9/lib/capistrano/twingly/tasks/tag_deploy_in_git.rake:11:in `block (2 levels) in <top (required)>'
/Users/mattias/.gem/ruby/2.1.2/gems/capistrano-3.2.1/lib/capistrano/dsl/task_enhancements.rb:12:in `block in after'
/Users/mattias/.gem/ruby/2.1.2/gems/capistrano-3.2.1/lib/capistrano/dsl.rb:15:in `invoke'
/Users/mattias/.gem/ruby/2.1.2/gems/capistrano-3.2.1/lib/capistrano/tasks/framework.rake:65:in `block (2 levels) in <top (required)>'
/Users/mattias/.gem/ruby/2.1.2/gems/capistrano-3.2.1/lib/capistrano/tasks/framework.rake:64:in `each'
/Users/mattias/.gem/ruby/2.1.2/gems/capistrano-3.2.1/lib/capistrano/tasks/framework.rake:64:in `block in <top (required)>'
/Users/mattias/.gem/ruby/2.1.2/gems/capistrano-3.2.1/lib/capistrano/application.rb:15:in `run'
/Users/mattias/.gem/ruby/2.1.2/gems/capistrano-3.2.1/bin/cap:3:in `<top (required)>'
/Users/mattias/.gem/ruby/2.1.2/bin/cap:23:in `load'
/Users/mattias/.gem/ruby/2.1.2/bin/cap:23:in `<main>'
Tasks: TOP => deploy:push_deploy_tag
(See full trace by running task with --trace)
The deploy has failed with an error: #<SSHKit::Command::Failed: git tag 2014-06-03__13_21_16__production 4042f21 -m "Deployed by Mattias Roback <[email protected]>" exit status: 32768
git tag 2014-06-03__13_21_16__production 4042f21 -m "Deployed by Mattias Roback <[email protected]>" stdout: Nothing written
git tag 2014-06-03__13_21_16__production 4042f21 -m "Deployed by Mattias Roback <[email protected]>" stderr: fatal: Failed to resolve '4042f21' as a valid ref.
@jage jage added the bug label Jun 3, 2014
@dentarg
Copy link
Contributor

dentarg commented Jul 30, 2014

Happened to me today.

@walro
Copy link
Contributor

walro commented Apr 5, 2017

Me today

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

No branches or pull requests

4 participants