Skip to content

Commit

Permalink
add --no-docker option (bioconda#8867)
Browse files Browse the repository at this point in the history
  • Loading branch information
daler authored May 9, 2018
1 parent a4745cb commit 3b8a23d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .circleci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e
[[ -z $WORKSPACE ]] && WORKSPACE=`pwd`
[[ -z $BOOTSTRAP ]] && BOOTSTRAP=false
[[ -z $BASH_ENV ]] && BASH_ENV=`mktemp`
[[ -z $USE_DOCKER ]] && USE_DOCKER=true

set -u

Expand All @@ -29,7 +30,7 @@ git remote remove $UPSTREAM_REMOTE


# TODO: remove this workaround
if [[ $OSTYPE == linux* && ${CIRCLE_JOB-} != build ]]; then
if [[ $OSTYPE == linux* && ${CIRCLE_JOB-} != build ]] && [[ $USE_DOCKER == "true" ]]; then
docker pull continuumio/miniconda3:4.3.27
docker tag continuumio/miniconda3:4.3.27 continuumio/miniconda3:latest
fi
Expand Down
10 changes: 9 additions & 1 deletion bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
ap.add_argument('bootstrap', help='''Location to which a new Miniconda
installation plus bioconda-utils should be installed. This will
be separate from any existing conda installations.''')
ap.add_argument('--no-docker', action='store_true', help='''By default we
expect Docker to be present. Use this arg to disable that
behavior. This will reduce functionality, but is useful if
you're unable to install docker.''')
args = ap.parse_args()

# This is the "common" step in the CircleCI config which gets the versions of
Expand Down Expand Up @@ -92,7 +96,11 @@ def _write_custom_activate(install_path):
fout.write(line + '\n')


env = {'WORKSPACE': args.bootstrap, 'BOOTSTRAP': "true"}
use_docker = "true"
if args.no_docker:
use_docker = "false"

env = {'WORKSPACE': args.bootstrap, 'BOOTSTRAP': "true", 'USE_DOCKER': use_docker}
sp.check_call(['.circleci/setup.sh'], env=env)
_write_custom_activate(args.bootstrap)

Expand Down

0 comments on commit 3b8a23d

Please sign in to comment.