We are trying 2.0 and were pretty successful to get two of our projects built with 2.0 platform. However before I managed to get builds stable, I had to deal with strange and inconsistent behavior of some tools. In the end I managed to stabilize things with…
We have a custom
pyhon-2.7-slim based container and additional
version: 2 executorType: docker containerInfo: - image: our-custom-base-image/ci:3 - image: postgres:9.6 env: - POSTGRES_DB=circle_test - POSTGRES_PASSWORD= stages: build: workDir: ~/console-api steps: - type: checkout - type: shell name: Prepare Database shell: /bin/bash --login command: psql -h localhost -U postgres -d circle_test -c 'CREATE EXTENSION hstore' ...
With this setup every 2nd or 3rd build fails randomly with either
git is not found in base image or
psql unable to connect to postgres (connection refused) to execute the
CREATE statement. This happens randomly.
After all I got an impression that platform is so fast, that
psql step and
checkout are being executed earlier than
postgres container fully starts (or base image fully resolves?..)
The only one thing which helped me to stabilize builds is putting a
sleep as a very first step:
steps: - type: shell name: Spin up Time Machine command: sleep 4 && echo "The barman asks what the first one wants, two race conditions walk into a bar."
This does not really sound fun though
Is there anything I’m missing here? Does the platform check if container is fully up & running before diving into