diff --git a/Makefile b/Makefile
index c41feac14..6ab4afd49 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ full: provision build
all: build
build:
- python2 ./bin/console docker:build --threads=auto
+ bin/console docker:build --threads=auto
bootstrap: webdevops/bootstrap webdevops/ansible
base: webdevops/base webdevops/base-app webdevops/storage
@@ -40,20 +40,20 @@ requirements:
cd tests/serverspec && bundle install --path=vendor
test:
- python2 bin/console test:serverspec --threads=auto -v
+ bin/console test:serverspec --threads=auto -v
provision:
- python2 bin/console generate:dockerfile
- python2 bin/console generate:provision
+ bin/console generate:dockerfile
+ bin/console generate:provision
push:
- python2 ./bin/console docker:push --threads=auto
+ bin/console docker:push --threads=auto
graph:
- python2 ./bin/console generate:graph
+ bin/console generate:graph
graph-full:
- python2 ./bin/console generate:graph --all\
+ bin/console generate:graph --all\
--filename docker-image-full-layout.gv
documentation:
@@ -65,4 +65,4 @@ documentation:
--poll -H 0.0.0.0 /opt/docs html
webdevops/%:
- python2 ./bin/console docker:build --threads=auto --whitelist=$@
+ bin/console docker:build --threads=auto --whitelist=$@
diff --git a/bin/command/docker_build_command.py b/bin/command/docker_build_command.py
index 0a0e08f99..969a516ac 100644
--- a/bin/command/docker_build_command.py
+++ b/bin/command/docker_build_command.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
diff --git a/bin/command/docker_exec_command.py b/bin/command/docker_exec_command.py
index 0f84f7627..7ecbd6bb4 100644
--- a/bin/command/docker_exec_command.py
+++ b/bin/command/docker_exec_command.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -51,11 +51,11 @@ def run_task(self, configuration):
for dockerfile in dockerfile_list:
title = dockerfile['image']['fullname']
- print title
- print '~' * len(title)
+ print(title)
+ print('~' * len(title))
if configuration['dryRun']:
- print ' exec: %s' % (docker_command)
+ print(' exec: %s' % (docker_command))
else:
cmd = [
@@ -71,19 +71,19 @@ def run_task(self, configuration):
status = Command.execute(cmd)
if status:
- print colored(' -> successfull', 'green')
+ print(colored(' -> successfull', 'green'))
else:
- print colored(' -> failed', 'red')
+ print(colored(' -> failed', 'red'))
image_fail_list.append(dockerfile['image']['fullname'])
- print ''
- print ''
+ print('')
+ print('')
if len(image_fail_list) >= 1:
- print ''
- print colored(' => failed images (%s):' % (str(len(image_fail_list))), 'red')
+ print('')
+ print(colored(' => failed images (%s):' % (str(len(image_fail_list))), 'red'))
for image in image_fail_list:
- print ' - %s ' % image
- print ''
+ print(' - %s ' % image)
+ print('')
return False
else:
diff --git a/bin/command/docker_pull_command.py b/bin/command/docker_pull_command.py
index e6f960b47..405e7fde0 100644
--- a/bin/command/docker_pull_command.py
+++ b/bin/command/docker_pull_command.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
diff --git a/bin/command/docker_push_command.py b/bin/command/docker_push_command.py
index 85912b5b7..074de2488 100644
--- a/bin/command/docker_push_command.py
+++ b/bin/command/docker_push_command.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
diff --git a/bin/command/generate_dockerfile_command.py b/bin/command/generate_dockerfile_command.py
index b5a3710d8..d0d8a6723 100644
--- a/bin/command/generate_dockerfile_command.py
+++ b/bin/command/generate_dockerfile_command.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
diff --git a/bin/command/generate_graph_command.py b/bin/command/generate_graph_command.py
index 1a82ee378..e46e3ccbb 100644
--- a/bin/command/generate_graph_command.py
+++ b/bin/command/generate_graph_command.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -43,7 +43,7 @@ class GenerateGraphCommand(BaseCommand):
'--format': Enum(['png', 'jpg', 'pdf', 'svg'])
}
- from_regex = re.compile(ur'FROM\s+(?P
[^\s:]+)(:(?P.+))?', re.MULTILINE)
+ from_regex = re.compile(r'FROM\s+(?P
[^\s:]+)(:(?P.+))?', re.MULTILINE)
containers = {}
@@ -116,7 +116,7 @@ def __append_tag(self, docker_image, tag):
:return: self
"""
- if not self.tags.has_key(docker_image):
+ if docker_image not in self.tags:
self.tags[docker_image] = {}
self.tags[docker_image][tag] = tag
return self
@@ -133,7 +133,7 @@ def __get_graph(self, default_graph, name):
:return: the selected diagram
:rtype: Digraph
"""
- for group, group_attr in self.conf['diagram']['groups'].items():
+ for group, group_attr in list(self.conf['diagram']['groups'].items()):
for dockerRegex in group_attr['docker']:
if re.match(dockerRegex, name):
return group, self.subgraph[group]
@@ -190,7 +190,7 @@ def build_graph(self):
rank_group_list = {}
# Create subgraph
- for group, group_attr in self.conf['diagram']['groups'].items():
+ for group, group_attr in list(self.conf['diagram']['groups'].items()):
self.subgraph[group] = Digraph('cluster_%s' % group)
self.subgraph[group].body.append(r'label = "%s"' % group_attr['name'])
self.subgraph[group] = self.__apply_styles(self.subgraph[group], group_attr['styles'])
@@ -198,7 +198,7 @@ def build_graph(self):
if 'rank' in group_attr:
rank_group_list[group] = group_attr['rank']
- for image, base in self.containers.items():
+ for image, base in list(self.containers.items()):
group_image, graph_image = self.__get_graph(dia, image)
group_base, graph_base = self.__get_graph(dia, base)
if not "scratch" in base:
@@ -221,15 +221,15 @@ def build_graph(self):
rank_image_list[image_rank].append(image)
# add repositories (subgraph/cluster)
- for name, subgraph in self.subgraph.items():
+ for name, subgraph in list(self.subgraph.items()):
dia.subgraph(subgraph)
# add images (node)
- for image, base in self.edges.items():
+ for image, base in list(self.edges.items()):
dia.edge(base, image)
# add invisible constraints to add ranked groups
- for rank, imagelist in rank_image_list.items():
+ for rank, imagelist in list(rank_image_list.items()):
rank_next = rank + 1
if rank_next in rank_image_list:
diff --git a/bin/command/generate_provision_command.py b/bin/command/generate_provision_command.py
index cdf3cec44..94c84a036 100644
--- a/bin/command/generate_provision_command.py
+++ b/bin/command/generate_provision_command.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -22,7 +22,7 @@
import yaml
import yamlordereddictloader
import time
-import Queue
+import queue
import shutil
import grp
from cleo import Output
@@ -46,7 +46,7 @@ class GenerateProvisionCommand(BaseCommand):
__queue = ''
def run_task(self, configuration):
- self.__queue = Queue.Queue()
+ self.__queue = queue.Queue()
if Output.VERBOSITY_VERBOSE <= self.output.get_verbosity():
self.line('provision : %s' % configuration.get('provisionPath'))
self.line('dockerfile : %s' % configuration.get('dockerPath'))
diff --git a/bin/command/test_serverspec_command.py b/bin/command/test_serverspec_command.py
index 69c5ac5ad..5774d9cd2 100644
--- a/bin/command/test_serverspec_command.py
+++ b/bin/command/test_serverspec_command.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
diff --git a/bin/command/test_testinfra_command.py b/bin/command/test_testinfra_command.py
index 39508bd45..7204c6542 100644
--- a/bin/command/test_testinfra_command.py
+++ b/bin/command/test_testinfra_command.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
diff --git a/bin/console b/bin/console
index 0ec2645a0..ea4e0358e 100755
--- a/bin/console
+++ b/bin/console
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os, sys
@@ -7,8 +7,8 @@ import os, sys
sys.dont_write_bytecode = True
# unbuffered stdout / stderr
-sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
-sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 0)
+sys.stdout = os.fdopen(sys.stdout.fileno(), 'w')
+sys.stderr = os.fdopen(sys.stderr.fileno(), 'w')
import re, yaml
from cleo import Application
@@ -43,19 +43,19 @@ if __name__ == '__main__':
# Read console.yml for configuration
with open(os.path.join(conf_path, 'console.yml'), 'r') as stream:
try:
- configuration = yaml.load(stream)
+ configuration = yaml.load(stream, Loader=yaml.FullLoader)
configuration['confPath'] = conf_path
except yaml.YAMLError as e:
configuration = None
- print ' !!! Exception while loading configuration from %s:' % conf_path
- print ''
- print e
- print ''
+ print(' !!! Exception while loading configuration from %s:' % conf_path)
+ print('')
+ print(e)
+ print('')
sys.exit(1)
# Check if configuration is valid
if configuration is None:
- print ' !!! Configuration not found'
+ print(' !!! Configuration not found')
sys.exit(1)
# generate full paths
diff --git a/bin/webdevops/Command.py b/bin/webdevops/Command.py
index c7979e8d3..b190a731f 100644
--- a/bin/webdevops/Command.py
+++ b/bin/webdevops/Command.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -25,7 +25,7 @@ def execute(cmd, cwd=False, env=None):
Execute cmd and output stdout/stderr
"""
- print 'Execute: %s' % ' '.join(cmd)
+ print('Execute: %s' % ' '.join(cmd))
if env is not None:
env = copy.deepcopy(env)
@@ -67,7 +67,7 @@ def execute(cmd, cwd=False, env=None):
# output stdout
with open(file_stdout.name, 'r') as f:
for line in f:
- print line.rstrip('\n')
+ print(line.rstrip('\n'))
# restore current work directory
os.chdir(path_current)
@@ -75,5 +75,5 @@ def execute(cmd, cwd=False, env=None):
if proc.returncode == 0:
return True
else:
- print '>> failed command with return code %s' % proc.returncode
+ print('>> failed command with return code %s' % proc.returncode)
return False
diff --git a/bin/webdevops/Configuration.py b/bin/webdevops/Configuration.py
index 3d6cfad25..ecd8c5290 100644
--- a/bin/webdevops/Configuration.py
+++ b/bin/webdevops/Configuration.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -44,7 +44,7 @@
'docker': {
'imagePrefix': '',
'autoLatestTag': False,
- 'fromRegExp': re.compile(ur'FROM\s+(?P
[^\s:]+)(:(?P.+))?', re.MULTILINE),
+ 'fromRegExp': re.compile(r'FROM\s+(?P
[^\s:]+)(:(?P.+))?', re.MULTILINE),
'pathRegex': False,
'autoPull': False,
'autoPullWhitelist': False,
@@ -83,7 +83,7 @@ def dictmerge(original, update):
Recursively update a dict.
Subdict's won't be overwritten but also updated.
"""
- for key, value in original.iteritems():
+ for key, value in original.items():
if key not in update:
update[key] = value
elif isinstance(value, dict):
@@ -101,7 +101,7 @@ def __init__(self, value=None):
for key in value:
self.__setitem_internal__(key, value[key])
else:
- raise TypeError, 'expected dict'
+ raise TypeError('expected dict')
def __setitem_internal__(self, key, value):
"""
@@ -116,7 +116,7 @@ def __setitem__(self, key, value):
myKey, restOfKey = key.split('.', 1)
target = self.setdefault(myKey, dotdictify())
if not isinstance(target, dotdictify):
- raise KeyError, 'cannot set "%s" in "%s" (%s)' % (restOfKey, myKey, repr(target))
+ raise KeyError('cannot set "%s" in "%s" (%s)' % (restOfKey, myKey, repr(target)))
target[restOfKey] = value
else:
if isinstance(value, dict) and not isinstance(value, dotdictify):
@@ -129,7 +129,7 @@ def __getitem__(self, key, raw=False):
myKey, restOfKey = key.split('.', 1)
target = dict.get(self, myKey, None)
if not isinstance(target, dotdictify):
- raise KeyError, 'cannot get "%s" in "%s" (%s)' % (restOfKey, myKey, repr(target))
+ raise KeyError('cannot get "%s" in "%s" (%s)' % (restOfKey, myKey, repr(target)))
return target[restOfKey]
def __contains__(self, key):
diff --git a/bin/webdevops/Dockerfile.py b/bin/webdevops/Dockerfile.py
index 8955a0597..428ad3655 100644
--- a/bin/webdevops/Dockerfile.py
+++ b/bin/webdevops/Dockerfile.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -40,7 +40,7 @@ def finder(dockerfile_path, filename="Dockerfile", filter=[]):
:rtype: list
"""
dockerfile_stack = []
- filter_regex = re.compile(ur'.*(%s).*' % "|".join(filter), re.IGNORECASE)
+ filter_regex = re.compile(r'.*(%s).*' % "|".join(filter), re.IGNORECASE)
# pprint(filter_regex.pattern)
for root, dirs, files in os.walk(dockerfile_path):
for file in files:
diff --git a/bin/webdevops/DockerfileUtility.py b/bin/webdevops/DockerfileUtility.py
index 32b32a966..d346be137 100644
--- a/bin/webdevops/DockerfileUtility.py
+++ b/bin/webdevops/DockerfileUtility.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -21,8 +21,8 @@
import os
import re
-DOCKERFILE_STATEMENT_FROM_RE = re.compile(ur'FROM\s+(?P
[^\s:]+)(:(?P[^\s:]+))?(?!.*\s+AS)', re.MULTILINE)
-DOCKERFILE_STATEMENT_FROM_MULTISTAGE_RE = re.compile(ur'FROM\s+(?P
[^\s:]+)(:(?P[^\s:]+))?(\s+AS)', re.MULTILINE)
+DOCKERFILE_STATEMENT_FROM_RE = re.compile(r'FROM\s+(?P
[^\s:]+)(:(?P[^\s:]+))?(?!.*\s+AS)', re.MULTILINE)
+DOCKERFILE_STATEMENT_FROM_MULTISTAGE_RE = re.compile(r'FROM\s+(?P
[^\s:]+)(:(?P[^\s:]+))?(\s+AS)', re.MULTILINE)
def find_file_in_path(dockerfile_path, filename="Dockerfile", whitelist=False, blacklist=False):
"""
@@ -64,7 +64,7 @@ def find_file_in_path(dockerfile_path, filename="Dockerfile", whitelist=False, b
if blacklist:
for term in blacklist:
- file_list = filter(lambda x: term not in x, file_list)
+ file_list = [x for x in file_list if term not in x]
return file_list
@@ -143,7 +143,7 @@ def filter_dockerfile(dockerfile_list, whitelist=False, blacklist=False):
if blacklist:
for term in blacklist:
- dockerfile_list = filter(lambda x: term not in x['image']['fullname'], dockerfile_list)
+ dockerfile_list = [x for x in dockerfile_list if term not in x['image']['fullname']]
return dockerfile_list
diff --git a/bin/webdevops/Provisioner.py b/bin/webdevops/Provisioner.py
index 08dc1ad7a..06cb6f11d 100644
--- a/bin/webdevops/Provisioner.py
+++ b/bin/webdevops/Provisioner.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -24,7 +24,7 @@
import os
from distutils.dir_util import copy_tree, remove_tree
from threading import Thread
-import Queue
+import queue
import shutil
@@ -92,7 +92,7 @@ def run(self):
if 'configuration' in self.image_config:
self.__deploy_configuration()
self.__done_item()
- except Queue.Empty:
+ except queue.Empty:
if Output.VERBOSITY_VERBOSE <= self.output.get_verbosity():
self.line("End")
break
@@ -114,7 +114,7 @@ def __deploy_configuration(self):
"""
Deploy the configuration to the container
"""
- for src, tag in self.image_config['configuration'].iteritems():
+ for src, tag in self.image_config['configuration'].items():
if Output.VERBOSITY_NORMAL <= self.output.get_verbosity():
self.line("%s => %s:%s" % (src, self.image_name, tag))
if isinstance(tag, list):
diff --git a/bin/webdevops/__init__.py b/bin/webdevops/__init__.py
index 0688bc71a..1725ac862 100644
--- a/bin/webdevops/__init__.py
+++ b/bin/webdevops/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -17,9 +17,3 @@
# THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-from Provisioner import Provisioner
-
-__all__ = [
- 'Provisioner',
-]
diff --git a/bin/webdevops/command/BaseCommand.py b/bin/webdevops/command/BaseCommand.py
index 6734f5917..6bec6e523 100644
--- a/bin/webdevops/command/BaseCommand.py
+++ b/bin/webdevops/command/BaseCommand.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -49,11 +49,11 @@ def handle(self):
try:
exitcode = self.run_task(configuration=self.configuration)
except KeyboardInterrupt as e:
- print ' !!! Execution aborted by user'
+ print(' !!! Execution aborted by user')
exitcode = 1
except SystemExit as e:
- print ' !!! Execution aborted by SystemExit'
- print ''
+ print(' !!! Execution aborted by SystemExit')
+ print('')
traceback.print_exc(file=sys.stdout)
exitcode = 1
@@ -90,26 +90,26 @@ def startup(self):
DoitReporter.simulation_mode = True
- print 'Executing %s (%s)' % (self.name, ', '.join(options))
- print ''
+ print('Executing %s (%s)' % (self.name, ', '.join(options)))
+ print('')
try:
whitelist = self.get_whitelist()
if whitelist:
- print 'WHITELIST active:'
+ print('WHITELIST active:')
for item in whitelist:
- print ' - %s' % item
- print ''
+ print(' - %s' % item)
+ print('')
except:
pass
try:
blacklist = self.get_blacklist()
if blacklist:
- print 'BLACKLIST active:'
+ print('BLACKLIST active:')
for item in blacklist:
- print ' - %s' % item
- print ''
+ print(' - %s' % item)
+ print('')
except:
pass
@@ -128,11 +128,11 @@ def shutdown(self, exitcode=0):
self.teardown(exitcode)
- print ''
+ print('')
if exitcode == 0:
- print '> finished execution in %s successfully' % (duration)
+ print('> finished execution in %s successfully' % (duration))
else:
- print '> finished execution in %s with errors (exitcode %s)' % (duration, exitcode)
+ print('> finished execution in %s with errors (exitcode %s)' % (duration, exitcode))
def build_configuration(self):
"""
@@ -207,7 +207,7 @@ def get_blacklist(self):
# static BLACKLIST file
if os.path.isfile(self.configuration.get('blacklistFile')):
lines = [line.rstrip('\n').lstrip('\n') for line in open(self.configuration.get('blacklistFile'))]
- lines = filter(bool, lines)
+ lines = list(filter(bool, lines))
if lines:
ret.extend(lines)
diff --git a/bin/webdevops/command/DoitCommand.py b/bin/webdevops/command/DoitCommand.py
index c7d1dc3ed..67940470a 100644
--- a/bin/webdevops/command/DoitCommand.py
+++ b/bin/webdevops/command/DoitCommand.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
diff --git a/bin/webdevops/command/__init__.py b/bin/webdevops/command/__init__.py
index 9be4e15cb..4959875f5 100644
--- a/bin/webdevops/command/__init__.py
+++ b/bin/webdevops/command/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -18,8 +18,8 @@
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-from BaseCommand import BaseCommand
-from DoitCommand import DoitCommand
+from .BaseCommand import BaseCommand
+from .DoitCommand import DoitCommand
__all__ = [
'BaseCommand',
diff --git a/bin/webdevops/docker/DockerBaseClient.py b/bin/webdevops/docker/DockerBaseClient.py
index b8b22cd9c..c19d821bc 100644
--- a/bin/webdevops/docker/DockerBaseClient.py
+++ b/bin/webdevops/docker/DockerBaseClient.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -29,19 +29,19 @@ def pull_image(self, name, tag):
"""
Build dockerfile
"""
- print 'Pull image %s:%s' % (name, tag)
+ print('Pull image %s:%s' % (name, tag))
return True
def build_dockerfile(self, path, name, nocache=False):
"""
Build dockerfile
"""
- print 'Build Dockerfile %s with name %s' % (path, name)
+ print('Build Dockerfile %s with name %s' % (path, name))
return True
def push_image(self, name):
"""
Push one Docker image to registry
"""
- print 'Build image %s' % (name)
+ print('Build image %s' % (name))
return True
diff --git a/bin/webdevops/docker/DockerCliClient.py b/bin/webdevops/docker/DockerCliClient.py
index 2f59b5171..87415d587 100644
--- a/bin/webdevops/docker/DockerCliClient.py
+++ b/bin/webdevops/docker/DockerCliClient.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -31,11 +31,18 @@ def pull_image(self, name, tag):
cmd = ['docker', 'pull', '%s:%s' % (name, tag)]
return Command.execute(cmd)
- def build_dockerfile(self, path, name, nocache=False):
+ def build_dockerfile(self, path, name, nocache=False, **kwargs):
"""
Build dockerfile
"""
- cmd = ['docker', 'build', '--tag', name, os.path.dirname(path)]
+ cmd = ['docker', 'build', '--tag', name]
+ if 'buildargs' in kwargs:
+ cmd.append('--build-arg')
+ args = []
+ for k, v in list(kwargs['buildargs'].items()):
+ args.append("%s=%s" % (k, v))
+ cmd.append(','.join(args))
+ cmd.append(os.path.dirname(path))
if nocache:
cmd.append('--no-cache')
diff --git a/bin/webdevops/docker/DockerPyClient.py b/bin/webdevops/docker/DockerPyClient.py
index 507a190f0..75fb5b831 100644
--- a/bin/webdevops/docker/DockerPyClient.py
+++ b/bin/webdevops/docker/DockerPyClient.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -50,7 +50,7 @@ def pull_image(self, name, tag):
return self.process_client_response(response)
- def build_dockerfile(self, path, name, nocache=False):
+ def build_dockerfile(self, path, name, nocache=False, **kwargs):
"""
Build dockerfile
"""
@@ -60,7 +60,8 @@ def build_dockerfile(self, path, name, nocache=False):
pull=False,
nocache=nocache,
quiet=False,
- decode=True
+ decode=True,
+ **kwargs
)
return self.process_client_response(response)
@@ -110,5 +111,5 @@ def output_message(message, prevent_repeat=False):
if 'id' in line:
message += ' ' + line['id']
output_message(message)
- print ''
+ print('')
return ret
diff --git a/bin/webdevops/docker/__init__.py b/bin/webdevops/docker/__init__.py
index 9124d6a99..d4632a7fc 100644
--- a/bin/webdevops/docker/__init__.py
+++ b/bin/webdevops/docker/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -18,9 +18,9 @@
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-from DockerBaseClient import DockerBaseClient
-from DockerPyClient import DockerPyClient
-from DockerCliClient import DockerCliClient
+from .DockerBaseClient import DockerBaseClient
+from .DockerPyClient import DockerPyClient
+from .DockerCliClient import DockerCliClient
__all__ = [
'DockerBaseClient',
diff --git a/bin/webdevops/doit/DoitReporter.py b/bin/webdevops/doit/DoitReporter.py
index 84c85ee53..341361017 100644
--- a/bin/webdevops/doit/DoitReporter.py
+++ b/bin/webdevops/doit/DoitReporter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -18,7 +18,7 @@
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-import os, sys, time, datetime, StringIO
+import os, sys, time, datetime, io
import termcolor
from termcolor import colored
from ..taskloader.BaseTaskLoader import BaseTaskLoader
@@ -121,9 +121,9 @@ def __init__(self, outstream, options=None): #pylint: disable=W0613
# than the data. so anything that is sent to stdout/err needs to
# be captured.
self._old_out = sys.stdout
- sys.stdout = StringIO.StringIO()
+ sys.stdout = io.StringIO()
self._old_err = sys.stderr
- sys.stderr = StringIO.StringIO()
+ sys.stderr = io.StringIO()
self.outstream = outstream
# runtime and cleanup errors
self.errors = []
@@ -246,7 +246,7 @@ def complete_run(self):
if self.errors:
log_err += "\n".join(self.errors)
- task_result_list = [tr.to_dict() for tr in self.t_results.values()]
+ task_result_list = [tr.to_dict() for tr in list(self.t_results.values())]
self.writeln('')
self.writeln('-> finished %s tasks' % (len(task_result_list)))
diff --git a/bin/webdevops/doit/__init__.py b/bin/webdevops/doit/__init__.py
index 29fb79a7c..9de16656d 100644
--- a/bin/webdevops/doit/__init__.py
+++ b/bin/webdevops/doit/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -18,7 +18,7 @@
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-from DoitReporter import DoitReporter
+from .DoitReporter import DoitReporter
__all__ = [
'DoitReporter',
diff --git a/bin/webdevops/taskloader/BaseDockerTaskLoader.py b/bin/webdevops/taskloader/BaseDockerTaskLoader.py
index 42404c5a6..6ff7901c0 100644
--- a/bin/webdevops/taskloader/BaseDockerTaskLoader.py
+++ b/bin/webdevops/taskloader/BaseDockerTaskLoader.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
diff --git a/bin/webdevops/taskloader/BaseTaskLoader.py b/bin/webdevops/taskloader/BaseTaskLoader.py
index a919fb934..ee2166e92 100644
--- a/bin/webdevops/taskloader/BaseTaskLoader.py
+++ b/bin/webdevops/taskloader/BaseTaskLoader.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -18,7 +18,7 @@
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-import sys, re, time, StringIO, tempfile, json, base64, os
+import sys, re, time, io, tempfile, json, base64, os
from webdevops import DockerfileUtility
from doit.cmd_base import TaskLoader
from doit.task import dict_to_task
@@ -45,7 +45,7 @@ def process_tasklist(self, tasklist):
for task in tasklist:
ret.append(dict_to_task(task))
- print 'Starting execution of %s tasks...' % (len(ret))
+ print('Starting execution of %s tasks...' % (len(ret)))
BaseTaskLoader.TASK_COUNT = len(ret)
@@ -117,7 +117,7 @@ def task_runner(func, args, task):
Will return the stdout if task fails as exception
"""
backup = sys.stdout
- sys.stdout = StringIO.StringIO()
+ sys.stdout = io.StringIO()
status = func(task=task, *args)
output = sys.stdout.getvalue().strip()
sys.stdout.close()
@@ -126,7 +126,7 @@ def task_runner(func, args, task):
if not status:
raise Exception(output)
else:
- print output
+ print(output)
return status
@@ -134,7 +134,7 @@ def task_runner(func, args, task):
@staticmethod
def task_statusfile(task):
- return '%s/%s' % (tempfile.gettempdir(), base64.b64encode(task.name))
+ return '%s/%s' % (tempfile.gettempdir(), base64.b64encode(task.name.encode('utf-8')))
@staticmethod
def task_write_statusfile(task, data):
@@ -164,5 +164,5 @@ def task_get_statusfile(task, remove=True):
@staticmethod
def task_remove_statusfile(task):
- filename = '%s/%s' % (tempfile.gettempdir(), base64.b64encode(task.name))
+ filename = '%s/%s' % (tempfile.gettempdir(), base64.b64encode(task.name.encode('utf-8')))
os.remove(filename)
diff --git a/bin/webdevops/taskloader/DockerBuildTaskLoader.py b/bin/webdevops/taskloader/DockerBuildTaskLoader.py
index 761e7cbe3..93e8e2a49 100644
--- a/bin/webdevops/taskloader/DockerBuildTaskLoader.py
+++ b/bin/webdevops/taskloader/DockerBuildTaskLoader.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -73,7 +73,7 @@ def task_dependency_puller(docker_client, dockerfileList, configuration, task):
Pulls dependency images before building
"""
def pull_image(image):
- print ' -> Pull base image %s ' % image
+ print(' -> Pull base image %s ' % image)
if configuration.get('dryRun'):
return True
@@ -91,9 +91,9 @@ def pull_image(image):
if pull_status:
break
elif retry_count < (configuration.get('retry') - 1):
- print ' failed, retrying... (try %s)' % (retry_count + 1)
+ print(' failed, retrying... (try %s)' % (retry_count + 1))
else:
- print ' failed, giving up'
+ print(' failed, giving up')
if not pull_status:
return False
@@ -130,31 +130,32 @@ def task_run(docker_client, dockerfile, configuration, task):
# check if dockerfile is symlink, skipping tests if just a duplicate image
# image is using the same hashes
if dockerfile['image']['duplicate'] and not task.task_dep:
- print ' Docker image %s is build from symlink but not included in build chain, please include %s' % (dockerfile['image']['fullname'], dockerfile['image']['from'])
- print ' -> failing build'
+ print(' Docker image %s is build from symlink but not included in build chain, please include %s' % (dockerfile['image']['fullname'], dockerfile['image']['from']))
+ print(' -> failing build')
return False
if configuration.get('dryRun'):
- print ' path: %s' % dockerfile['path']
- print ' dep: %s' % (DockerBuildTaskLoader.human_task_name_list(task.task_dep) if task.task_dep else 'none')
+ print(' path: %s' % dockerfile['path'])
+ print(' dep: %s' % (DockerBuildTaskLoader.human_task_name_list(task.task_dep) if task.task_dep else 'none'))
return True
## Build image
- print ' -> Building image %s ' % dockerfile['image']['fullname']
+ print(' -> Building image %s ' % dockerfile['image']['fullname'])
build_status = False
for retry_count in range(0, configuration.get('retry')):
build_status = docker_client.build_dockerfile(
path=dockerfile['path'],
name=dockerfile['image']['fullname'],
nocache=configuration.get('dockerBuild.noCache'),
+ buildargs={'TARGETPLATFORM': 'linux/arm64'},
)
if build_status:
break
elif retry_count < (configuration.get('retry')-1):
- print ' failed, retrying... (try %s)' % (retry_count+1)
+ print(' failed, retrying... (try %s)' % (retry_count+1))
else:
- print ' failed, giving up'
+ print(' failed, giving up')
if build_status and dockerfile['image']['duplicate']:
BaseTaskLoader.set_task_status(task, 'finished (duplicate)', 'success2')
diff --git a/bin/webdevops/taskloader/DockerPullTaskLoader.py b/bin/webdevops/taskloader/DockerPullTaskLoader.py
index 4bed18a51..a8036c0d9 100644
--- a/bin/webdevops/taskloader/DockerPullTaskLoader.py
+++ b/bin/webdevops/taskloader/DockerPullTaskLoader.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -56,7 +56,7 @@ def task_run(docker_client, dockerfile, configuration, task):
Pull one Docker image from registry
"""
if configuration.get('dryRun'):
- print ' pull: %s' % (dockerfile['image']['fullname'])
+ print(' pull: %s' % (dockerfile['image']['fullname']))
return True
pull_status = False
@@ -69,9 +69,9 @@ def task_run(docker_client, dockerfile, configuration, task):
if pull_status:
break
elif retry_count < (configuration.get('retry') - 1):
- print ' failed, retrying... (try %s)' % (retry_count+1)
+ print(' failed, retrying... (try %s)' % (retry_count+1))
else:
- print ' failed, giving up'
+ print(' failed, giving up')
return pull_status
diff --git a/bin/webdevops/taskloader/DockerPushTaskLoader.py b/bin/webdevops/taskloader/DockerPushTaskLoader.py
index 974bdea7f..1d38dfcf9 100644
--- a/bin/webdevops/taskloader/DockerPushTaskLoader.py
+++ b/bin/webdevops/taskloader/DockerPushTaskLoader.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -61,7 +61,7 @@ def task_run(docker_client, dockerfile, configuration, task):
Push one Docker image to registry
"""
if configuration.get('dryRun'):
- print ' push: %s' % (dockerfile['image']['fullname'])
+ print(' push: %s' % (dockerfile['image']['fullname']))
return True
push_status = False
@@ -73,10 +73,10 @@ def task_run(docker_client, dockerfile, configuration, task):
if push_status:
break
elif retry_count < (configuration.get('retry') - 1):
- print ' failed, retrying... (try %s)' % (retry_count+1)
+ print(' failed, retrying... (try %s)' % (retry_count+1))
time.sleep(randint(10, 30))
else:
- print ' failed, giving up'
+ print(' failed, giving up')
return push_status
diff --git a/bin/webdevops/taskloader/DockerTestServerspecTaskLoader.py b/bin/webdevops/taskloader/DockerTestServerspecTaskLoader.py
index 4457d62f5..478ee56b5 100644
--- a/bin/webdevops/taskloader/DockerTestServerspecTaskLoader.py
+++ b/bin/webdevops/taskloader/DockerTestServerspecTaskLoader.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -61,15 +61,13 @@ def task_run(dockerfile, configuration, task):
"""
Run test
"""
-
# check if dockerfile is symlink, skipping tests if just a duplicate image
# image is using the same hashes
if dockerfile['image']['duplicate']:
- print ' Docker image %s is build from symlink and duplicate of %s' % (dockerfile['image']['fullname'], dockerfile['image']['from'])
- print ' -> skipping tests'
+ print(' Docker image %s is build from symlink and duplicate of %s' % (dockerfile['image']['fullname'], dockerfile['image']['from']))
+ print(' -> skipping tests')
BaseTaskLoader.set_task_status(task, 'skipped (symlink)', 'skipped')
return True
-
# Check if current image is a toolimage (no daemon)
is_toolimage = False
for term in configuration.get('dockerTest.toolImages', {}):
@@ -83,7 +81,7 @@ def task_run(dockerfile, configuration, task):
# create dockerfile
tmp_suffix = '.%s_%s_%s.tmp' % (dockerfile['image']['repository'], dockerfile['image']['imageName'], dockerfile['image']['tag'])
tmp_suffix = tmp_suffix.replace('/', '_')
- test_dockerfile = tempfile.NamedTemporaryFile(prefix='Dockerfile.', suffix=tmp_suffix, dir=configuration.get('serverspecPath'), bufsize=0, delete=False)
+ test_dockerfile = tempfile.NamedTemporaryFile(prefix='Dockerfile.', suffix=tmp_suffix, dir=configuration.get('serverspecPath'), delete=False)
# serverspec conf
serverspec_conf = DockerTestServerspecTaskLoader.generate_serverspec_configuration(
@@ -95,7 +93,7 @@ def task_run(dockerfile, configuration, task):
# serverspec options
serverspec_opts = []
- serverspec_opts.extend([spec_path, dockerfile['image']['fullname'], base64.b64encode(json.dumps(serverspec_conf)), os.path.basename(test_dockerfile.name)])
+ serverspec_opts.extend([spec_path, dockerfile['image']['fullname'], base64.b64encode(json.dumps(serverspec_conf).encode('utf-8')).decode('utf-8'), os.path.basename(test_dockerfile.name)])
# dockerfile content
dockerfile_content = DockerTestServerspecTaskLoader.generate_dockerfile(
@@ -107,24 +105,24 @@ def task_run(dockerfile, configuration, task):
# DryRun
if configuration.get('dryRun'):
if not os.path.isfile(spec_abs_path):
- print ' no tests found'
-
- print ' image: %s' % (dockerfile['image']['fullname'])
- print ' path: %s' % (spec_path)
- print ' args: %s' % (' '.join(serverspec_opts))
- print ''
- print 'spec configuration:'
- print '-------------------'
- print json.dumps(serverspec_conf, indent=4, sort_keys=True)
- print ''
- print 'Dockerfile:'
- print '-----------'
- print dockerfile_content
+ print(' no tests found')
+
+ print(' image: %s' % (dockerfile['image']['fullname']))
+ print(' path: %s' % (spec_path))
+ print(' args: %s' % (' '.join(serverspec_opts)))
+ print('')
+ print('spec configuration:')
+ print('-------------------')
+ print(json.dumps(serverspec_conf, indent=4, sort_keys=True))
+ print('')
+ print('Dockerfile:')
+ print('-----------')
+ print(dockerfile_content)
return True
# check if we have any tests
if not os.path.isfile(spec_abs_path):
- print ' no tests defined (%s)' % (spec_path)
+ print(' no tests defined (%s)' % (spec_path))
BaseTaskLoader.set_task_status(task, 'skipped (no test)', 'skipped')
return True
@@ -133,7 +131,7 @@ def task_run(dockerfile, configuration, task):
cmd.extend(serverspec_opts)
# create Dockerfile
- with open(test_dockerfile.name, mode='w', buffering=0) as f:
+ with open(test_dockerfile.name, mode='w') as f:
f.write(dockerfile_content)
f.flush()
os.fsync(f.fileno())
@@ -144,15 +142,15 @@ def task_run(dockerfile, configuration, task):
try:
test_status = Command.execute(cmd, cwd=configuration.get('serverspecPath'))
except Exception as e:
- print e
+ print(e)
pass
if test_status:
break
elif retry_count < (configuration.get('retry') - 1):
- print ' failed, retrying... (try %s)' % (retry_count + 1)
+ print(' failed, retrying... (try %s)' % (retry_count + 1))
else:
- print ' failed, giving up'
+ print(' failed, giving up')
return test_status
diff --git a/bin/webdevops/taskloader/DockerTestTestinfraTaskLoader.py b/bin/webdevops/taskloader/DockerTestTestinfraTaskLoader.py
index a9bfe37db..a9f4ab9a2 100644
--- a/bin/webdevops/taskloader/DockerTestTestinfraTaskLoader.py
+++ b/bin/webdevops/taskloader/DockerTestTestinfraTaskLoader.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -70,8 +70,8 @@ def task_run(dockerfile, configuration, task):
test_opts.extend(['-v'])
if configuration.get('dryRun'):
- print ' image: %s' % (dockerfile['image']['fullname'])
- print ' args: %s' % (' '.join(test_opts))
+ print(' image: %s' % (dockerfile['image']['fullname']))
+ print(' args: %s' % (' '.join(test_opts)))
return True
exitcode = pytest.main(test_opts, plugins=[TestinfraDockerPlugin(configuration=configuration, docker_image=dockerfile['image']['fullname'])])
diff --git a/bin/webdevops/taskloader/__init__.py b/bin/webdevops/taskloader/__init__.py
index e333eaa0a..5d7d66a40 100644
--- a/bin/webdevops/taskloader/__init__.py
+++ b/bin/webdevops/taskloader/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -18,13 +18,13 @@
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-from BaseTaskLoader import BaseTaskLoader
-from BaseDockerTaskLoader import BaseDockerTaskLoader
-from DockerBuildTaskLoader import DockerBuildTaskLoader
-from DockerPushTaskLoader import DockerPushTaskLoader
-from DockerPullTaskLoader import DockerPullTaskLoader
-from DockerTestTestinfraTaskLoader import DockerTestTestinfraTaskLoader
-from DockerTestServerspecTaskLoader import DockerTestServerspecTaskLoader
+from .BaseTaskLoader import BaseTaskLoader
+from .BaseDockerTaskLoader import BaseDockerTaskLoader
+from .DockerBuildTaskLoader import DockerBuildTaskLoader
+from .DockerPushTaskLoader import DockerPushTaskLoader
+from .DockerPullTaskLoader import DockerPullTaskLoader
+from .DockerTestTestinfraTaskLoader import DockerTestTestinfraTaskLoader
+from .DockerTestServerspecTaskLoader import DockerTestServerspecTaskLoader
__all__ = [
'BaseTaskLoader',
diff --git a/bin/webdevops/testinfra/TestinfraDockerPlugin.py b/bin/webdevops/testinfra/TestinfraDockerPlugin.py
index ffe9ed322..7af0d1f45 100644
--- a/bin/webdevops/testinfra/TestinfraDockerPlugin.py
+++ b/bin/webdevops/testinfra/TestinfraDockerPlugin.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
diff --git a/bin/webdevops/testinfra/__init__.py b/bin/webdevops/testinfra/__init__.py
index 7a919e2a8..8f1d0f510 100644
--- a/bin/webdevops/testinfra/__init__.py
+++ b/bin/webdevops/testinfra/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) 2016 WebDevOps.io
@@ -18,7 +18,7 @@
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-from TestinfraDockerPlugin import TestinfraDockerPlugin
+from .TestinfraDockerPlugin import TestinfraDockerPlugin
__all__ = [
'TestinfraDockerPlugin',
diff --git a/tests/serverspec/.bundle/config b/tests/serverspec/.bundle/config
index b81abe028..344f8c03b 100644
--- a/tests/serverspec/.bundle/config
+++ b/tests/serverspec/.bundle/config
@@ -1,3 +1,3 @@
---
-BUNDLE_PATH: vendor
-BUNDLE_DISABLE_SHARED_GEMS: '1'
+BUNDLE_PATH: "vendor"
+BUNDLE_DISABLE_SHARED_GEMS: "true"
diff --git a/tests/serverspec/Gemfile.lock b/tests/serverspec/Gemfile.lock
index af146756f..9bb185668 100644
--- a/tests/serverspec/Gemfile.lock
+++ b/tests/serverspec/Gemfile.lock
@@ -1,46 +1,46 @@
GEM
remote: https://rubygems.org/
specs:
- diff-lcs (1.3)
- docker-api (1.33.4)
- excon (>= 0.38.0)
- json
- excon (0.71.0)
- json (2.1.0)
- multi_json (1.12.1)
- net-scp (1.2.1)
- net-ssh (>= 2.6.5)
- net-ssh (4.1.0)
+ diff-lcs (1.5.0)
+ docker-api (2.2.0)
+ excon (>= 0.47.0)
+ multi_json
+ excon (0.92.3)
+ json (2.6.2)
+ multi_json (1.15.0)
+ net-scp (3.0.0)
+ net-ssh (>= 2.6.5, < 7.0.0)
+ net-ssh (6.1.0)
net-telnet (0.1.1)
- rake (12.3.3)
- rspec (3.6.0)
- rspec-core (~> 3.6.0)
- rspec-expectations (~> 3.6.0)
- rspec-mocks (~> 3.6.0)
- rspec-core (3.6.0)
- rspec-support (~> 3.6.0)
- rspec-expectations (3.6.0)
+ rake (13.0.6)
+ rspec (3.11.0)
+ rspec-core (~> 3.11.0)
+ rspec-expectations (~> 3.11.0)
+ rspec-mocks (~> 3.11.0)
+ rspec-core (3.11.0)
+ rspec-support (~> 3.11.0)
+ rspec-expectations (3.11.0)
diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.6.0)
- rspec-its (1.2.0)
+ rspec-support (~> 3.11.0)
+ rspec-its (1.3.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
- rspec-mocks (3.6.0)
+ rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.6.0)
- rspec-retry (0.5.4)
- rspec-core (> 3.3, < 3.7)
- rspec-support (3.6.0)
- serverspec (2.38.0)
+ rspec-support (~> 3.11.0)
+ rspec-retry (0.6.2)
+ rspec-core (> 3.3)
+ rspec-support (3.11.0)
+ serverspec (2.42.0)
multi_json
rspec (~> 3.0)
rspec-its
- specinfra (~> 2.53)
+ specinfra (~> 2.72)
sfl (2.3)
- specinfra (2.67.9)
+ specinfra (2.83.2)
net-scp
- net-ssh (>= 2.7, < 5.0)
- net-telnet
+ net-ssh (>= 2.7)
+ net-telnet (= 0.1.1)
sfl
PLATFORMS