We have a multi-step deployment procedure:
- Step 1 -> Send assets to S3, other prep work, and trigger elastic beanstalk deployment (occurs on CircleCI)
- Step 2 -> Elastic Beanstalk deployment (occurs on AWS)
What I'd like to do is block Circle builds until Step 2 has completed (Elastic Beanstalk deployment is in 'ready' state) to prevent additional builds from failing. One strategy to accomplish this is to include a 'wait' script as the last step in the build of Step 1 that would wait for the EB environment to return "ready". However, this will cost us unnecessary Circle credits so I'd rather not do it this way. Maybe there's a way to tell Circle to retry builds if EB is not in a 'ready' state?
What are some other strategies to accomplish this?