Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
Bump bugswarm-common (#14)
Browse files Browse the repository at this point in the history
* Bump bugswarm-common; allow '#' credentials

* Fix typo
  • Loading branch information
Robert-Furth authored Dec 20, 2022
1 parent 7aa080f commit 9421fa2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions bugswarm/client/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@
HOST_SANDBOX_DEFAULT = '~/bugswarm-sandbox'
CONTAINER_SANDBOX_DEFAULT = '/bugswarm-sandbox'

DOCKER_HUB_REPO = \
credentials.DOCKER_HUB_REPO if hasattr(credentials, 'DOCKER_HUB_REPO') else 'bugswarm/images'
DOCKER_HUB_CACHED_REPO = \
credentials.DOCKER_HUB_CACHED_REPO if hasattr(credentials, 'DOCKER_HUB_CACHED_REPO') else 'bugswarm/cached-images'
if hasattr(credentials, 'DOCKER_HUB_REPO') and credentials.DOCKER_HUB_REPO != '#':
DOCKER_HUB_REPO = credentials.DOCKER_HUB_REPO
else:
DOCKER_HUB_REPO = 'bugswarm/images'
if hasattr(credentials, 'DOCKER_HUB_CACHED_REPO') and credentials.DOCKER_HUB_CACHED_REPO != '#':
DOCKER_HUB_CACHED_REPO = credentials.DOCKER_HUB_CACHED_REPO
else:
DOCKER_HUB_CACHED_REPO = 'bugswarm/cached-images'


# By default, this function downloads the image, enters the container, and executes '/bin/bash' in the container.
Expand Down Expand Up @@ -97,7 +101,7 @@ def docker_pull(image_tag):
command = 'sudo docker pull {}'.format(image_location)
_, _, returncode = ShellWrapper.run_commands(command, shell=True)
if returncode != 0:
# Image is not in bugswarm/images
# Image is not in bugswarm/images
log.error('Could not download the image', image_location)
else:
log.info('Downloaded the image', image_location + '.')
Expand Down Expand Up @@ -138,4 +142,3 @@ def _image_location(image_tag):

def _default_host_sandbox():
return os.path.expanduser(HOST_SANDBOX_DEFAULT)

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='bugswarm-client',
version='0.1.7',
version='0.1.8',
url='https://github.com/BugSwarm/client',
author='BugSwarm',
author_email='[email protected]',
Expand All @@ -22,7 +22,7 @@
install_requires=[
'Click==6.7',
'requests>=2.20.0',
'bugswarm-common==0.1.13',
'bugswarm-common==2022.12.3',
],

entry_points={
Expand Down

0 comments on commit 9421fa2

Please sign in to comment.