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

Already on GitHub? Sign in to your account

Added wait_until_deployed option for OpsWorks #93

merged 1 commit into from Feb 3, 2014


None yet
4 participants

johanneswuerbach commented Jan 17, 2014

This PR adds a wait-until-deployed option to OpsWorks, which allows to display the result of the deployment and let travis mark the build according to the result.

@joshk joshk commented on the diff Jan 17, 2014

+ if deployment[:status] == 'successful'
+ log "Deployment successful."
+ else
+ error "Deployment failed."
+ end
+ end
+ def wait_until_deployed(deployment_id)
+ deployment = nil
+ loop do
+ result = client.describe_deployments(deployment_ids: [deployment_id])
+ deployment = result[:deployments].first
+ break unless deployment[:status] == "running"
+ print "."
+ sleep 5
+ end

joshk Jan 17, 2014


we might want to add a timeout for this loop, otherwise it could potentially go forever.


rkh Jan 17, 2014


Until our VM gets killed.


johanneswuerbach Jan 17, 2014


What would you think is a good default timeout? Our deployment takes usually between 1 and 5 minutes. 10?


rkh Jan 20, 2014


Seems good.


johanneswuerbach commented Jan 20, 2014

ok, I added a 10 minutes timeout. Probably a general configurable timeout around push_app is a good idea as EngineYard is also using some polling code: https://github.com/travis-ci/dpl/blob/master/lib/dpl/provider/engine_yard.rb#L71


johanneswuerbach commented Jan 24, 2014

@rkh anything missing to ship this PR?


johanneswuerbach commented Feb 3, 2014

Any update on this? @rkh @Aaron1011 This would really help us.


Aaron1011 commented Feb 3, 2014

@johanneswuerbach: Sorry for the really long delay. Everything looks good to me, I'm going to merge it unless @rkh sees anything.

Aaron1011 added a commit that referenced this pull request Feb 3, 2014

Merge pull request #93 from johanneswuerbach/opsworks-wait-until-depl…

Added wait_until_deployed option for OpsWorks

@Aaron1011 Aaron1011 merged commit 335816f into travis-ci:master Feb 3, 2014

1 check passed

default The Travis CI build passed

@grampajoe grampajoe referenced this pull request in travis-ci/docs-travis-ci-com Feb 26, 2014


Document wait-until-deployed for OpsWorks #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment