2018-02-15 06:30:38 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# -*- mode: sh; -*-
|
|
|
|
|
|
|
|
# File: before_install.sh
|
2018-07-12 22:43:56 +00:00
|
|
|
# Time-stamp: <2018-07-12 18:05:37>
|
2018-02-15 06:30:38 +00:00
|
|
|
# Copyright (C) 2018 Sergei Antipov
|
|
|
|
# Description:
|
|
|
|
|
|
|
|
# set -o xtrace
|
|
|
|
set -o nounset
|
|
|
|
set -o errexit
|
|
|
|
set -o pipefail
|
|
|
|
|
2018-02-15 07:04:29 +00:00
|
|
|
# Latest Ansible install
|
2018-07-05 09:19:08 +00:00
|
|
|
pip install docker ansible
|
2018-02-15 08:54:10 +00:00
|
|
|
|
2018-02-15 06:30:38 +00:00
|
|
|
# Pull docker image or build it
|
|
|
|
if [ -f tests/Dockerfile.${DISTRIBUTION}_${DIST_VERSION} ]
|
|
|
|
then
|
2018-02-15 08:14:06 +00:00
|
|
|
docker build --rm=true --file=tests/Dockerfile.${DISTRIBUTION}_${DIST_VERSION} --tag ${DISTRIBUTION}:${DIST_VERSION} tests
|
2018-02-15 06:30:38 +00:00
|
|
|
else
|
2018-02-15 08:14:06 +00:00
|
|
|
docker pull ${DISTRIBUTION}:${DIST_VERSION}
|
2018-02-15 06:30:38 +00:00
|
|
|
fi
|
|
|
|
|
2018-02-15 07:26:38 +00:00
|
|
|
ln -s ${PWD} tests/greendayonfire.mongodb
|