Skip to content

Commit

Permalink
Utils: Do not force pull in test.sh (#146)
Browse files Browse the repository at this point in the history
test.sh used to do `docker-compose pull` which unconditionally pulls
fresh images. It's often a waste of bandwidth and time:
`docker-compose build` already pulls any missing images, whereas
updating on every run means cache is busted and many images potentially
need to be rebuilt.

OTOH in CI we really want to make sure the tests pass against the
latest images; otherwise we can have misleading results which are
hard to debug.

So try to pull, but ignore failures. This makes sure the pipelines
are robust in face of network failure and enable offline usage with
warm cache, but still ensures the test targets are fresh if possible.
  • Loading branch information
dividedmind authored and dustinmm80 committed Aug 31, 2018
1 parent 0e7d0d4 commit bf76920
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test.sh
Expand Up @@ -20,7 +20,13 @@ function main() {
function startConjur() {
echo 'Starting Conjur environment'
echo '-----'
docker-compose pull

# We want to pull to make sure we're testing against the newest release;
# failing to ensure that has caused many mysterious failures in CI.
# However, unconditionally pulling prevents working offline even
# with a warm cache. So try to pull, but ignore failures.
docker-compose pull --ignore-pull-failures

docker-compose build
docker-compose up -d pg conjur_4 conjur_5
}
Expand Down

0 comments on commit bf76920

Please sign in to comment.