zilkey / auto_tagger Goto Github PK
View Code? Open in Web Editor NEWHelps you automatically create tags for each stage in a multi-stage deploment and deploy from the latest tag from the previous environment
License: MIT License
Helps you automatically create tags for each stage in a multi-stage deploment and deploy from the latest tag from the previous environment
License: MIT License
cucumber features/deployment.feature:12
Make the current one the default, allow for an override
Getting the following error:
** transaction: commit
* executing `deploy:restart'
* executing "touch /u/apps/frontend/current/tmp/restart.txt"
servers: ["fuzzy.benchmarksolutions.com"]
[fuzzy.benchmarksolutions.com] executing command
command finished
triggering after callbacks for `deploy'
* executing `deploy:notify:stop'
* executing `release_tagger:create_tag'
* executing `auto_tagger:create_ref'
** AUTO TAGGER: created tag refs/tags/staging/20100916133021 from c87291a0502f8dd65b95255344213dfe77e5c4bd
* executing `release_tagger:write_tag_to_shared'
* executing `auto_tagger:write_ref_to_shared'
** AUTO TAGGER: no branch available. Text file was not written to server
the task `release_tagger:print_latest_tags' does not exist
/Library/Ruby/Gems/1.8/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:79:in `abort'
/Library/Ruby/Gems/1.8/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:79:in `handle_error'
/Library/Ruby/Gems/1.8/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:39:in `execute!'
/Library/Ruby/Gems/1.8/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:14:in `execute'
/Library/Ruby/Gems/1.8/gems/capistrano-2.5.19/bin/cap:4
deploy file:
# The :autotagger_stages variable is required
set :autotagger_stages, [:"ci-green", :staging, :uat, :production]
task :staging do
set :stage, :staging # for autotagger
end
before "deploy:update_code", "release_tagger:set_branch"
after "deploy", "release_tagger:create_tag"
after "deploy", "release_tagger:write_tag_to_shared"
after "deploy", "release_tagger:print_latest_tags"
Versions of capistrano greater than 2.14.2 use git clone -b BRANCH
instead of just git clone, and the -b
option of git clone
can only take a branch name.
The auto_tagger capistrano recipe sets the branch
variable to a git sha, so git clone -b
breaks.
That bug was introduced way back in this commit in capistrano capistrano/capistrano@b8ce59c but only released with 2.15.2.
2.14.2 is the last good version, so I've released a new version of auto_tagger that only works with capistrano up to 2.14.2, but this is a hack.
The new version of auto_tagger is 0.2.10, and you have to downgrade capistrano, so this is obviously not a long-term fix.
From Brian:
I fixed autotagging when deploying from a branch. The autotagger used to always tag from the previous stage in :autotagger_stages. Now it uses :real_revision.
When I deploy, and I have capistrano integration setup, it appears that it doesn't push the tags.
Maybe production tags are special.
Some useful git commands to make this happen:
git update-ref refs/autotags/staging/20080505 HEAD
git rev-parse refs/autotags/staging/20080505
git checkout refs/autotags/staging/20080505
git log --decorate
git show --pretty=format:%d SHA
Hey Jeff,
When we specify an older ref using "-Sref=blahblah", the correct version is checked out on the server, but the created tag points to HEAD.
Thanks,
Dave & Michael
right now there are 2 points that call autotagger directly, which makes it a bit harder to refactor, and muddies up the concerns
to reproduce:
git commit -m "some changes"
autotag ci # => this pushes the tag to the remote repository
cap deploy # => sets it to the latest ci tag, which references a ref that doesn't exist
better behavior would be:
for example, you are testing a deploy script, and don't want to create 100 tags.
so that capistrano and autotag read from the same config
should have been from the tag I created
due to a symbol / string mismatch
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.