All builds were failing due to a change to the underlying circle ubuntu image. Read this thread on the circle forums if you would like context on what was happening.
What has changed?
After investigating with @kephail we changed the underlying base image which was over 2 years old to use the circle ci node image. This then led some sudo commands starting docker service to stop working. After some further investigation, I realized that docker was already available on the image so I removed these commands.
Now the build was passing but the push and deploy script that pushes to Amazons Elastic Container Registry was not authenticating properly and so was not able to push. I suspect that this is due to the way circle ci 2.1 runs docker commands in a remote separate environment for security reasons. I looked at some examples of communicating between AWS and circle and it seemed like the recommended way to do this was to use orbs (which are like functions for ci).
Using the orb for aws/ecr and for aws/cli I was able to get the deploy and push scripts working again. This did mean I had to change the structure of the circle.yml and the shell script for pushing and deploying images.
Make circle ci green again
What was the issue?
All builds were failing due to a change to the underlying circle ubuntu image. Read this thread on the circle forums if you would like context on what was happening.
What has changed?
After investigating with @kephail we changed the underlying base image which was over 2 years old to use the circle ci node image. This then led some
sudo
commands startingdocker service
to stop working. After some further investigation, I realized that docker was already available on the image so I removed these commands.Now the build was passing but the push and deploy script that pushes to Amazons Elastic Container Registry was not authenticating properly and so was not able to push. I suspect that this is due to the way circle ci 2.1 runs docker commands in a remote separate environment for security reasons. I looked at some examples of communicating between AWS and circle and it seemed like the recommended way to do this was to use orbs (which are like functions for ci).
Using the orb for
aws/ecr
and foraws/cli
I was able to get the deploy and push scripts working again. This did mean I had to change the structure of thecircle.yml
and the shell script for pushing and deploying images.How can we test it?
[x] circle ci passes [] make sure staging works