Create a new job that will allow us to publish our dox images. This
will remove the need to manually publish them.
Change-Id: I1f817b9154bfebe87b5c66291e70bc8fc10f203a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Bindep is a tool for checking the presence of binary packages needed
to use an application / library. It started life as a way to make it
easier to set up a development environment for OpenStack projects.
While OpenStack depends heavily on pip for installation of Python
dependencies, some dependencies are not Python based, and particularly
for testing, some dependencies have to be installed before pip can be
used - such as virtualenv and pip itself.
Change-Id: I92cbfc36610cb931790b6e607dcb317ce2dac08e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
argparse was external in python 2.6 but not anymore, remove it from
requirements.
This should help with pip 8.0 that gets confused in this situation.
Installation of the external argparse is not needed.
Change-Id: Ib7e74912b36c1b5ccb514e31fac35efeff57378d
Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.
Change-Id: I0dfc37bd9aad42914e1cd4b2bfadb71358d62bf4
Closes-bug: #1280522
With the -D flag present, the only extra output is of type:
time="2015-12-17T10:50:24+01:00" level=debug msg="framesize: 74"
between every single STDOUT line. This shouldn't be needed, as you would
expect the debug flag to influence dox things, not Docker
Change-Id: I224c9e13f5f2a0775afb0ca5f74dd7abf69adc45
dffe391 Don't prefix the cached image with `_`
ea141b9 Don't run useradd for root
d3971df Add Centos 7 Dockerfile
d0d15f9 More informative error when command fails
Change-Id: Ifb75bca3c7d513392857d9d611594b582b686d62
Newer docker versions don't allow images' names starting with `_`. This
patch removes the `_` prefix from the code.
Change-Id: Ibbc82f0c8c86c149835f66f84f1664b347ae76c1
When running dox with an user_map check whether the user is root and
skip the useradd command on image build if so. Most (all?) images have a
root user anyway.
Change-Id: I08eb60254fb437e02c61025d0a7761eb774c11f3
Instead of:
ERROR|dox.cmd|Operation failed, aborting dox.
we get:
ERROR|dox.cmd|Operation failed, aborting dox.
Traceback (most recent call last):
File "/Users/marca/dev/git-repos/dox/dox/cmd.py", line 99, in run_dox
map(run, images)
File "/Users/marca/dev/git-repos/dox/dox/runner.py", line 209, in run
self.build_test_image(image, command)
File "/Users/marca/dev/git-repos/dox/dox/runner.py", line 157, in build_test_image
shutil.copy(add_file, os.path.join(tempd, add_file))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 119, in copy
copyfile(src, dst)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'tests_require.txt'
Change-Id: Icdb25ae2c2f06ffab416d215a7f8b360f9b65c1e
Replace URLs for workflow documentation to appropriate parts of the
OpenStack Project Infrastructure Manual.
Change-Id: I70e9e78efad4aa6cf593b266513711a49d1f5ace
Image name were named exactly the same no matter which
environement/section we were running.
We now have :
_dox/$project_name_$environment_(base|test)
as image name, the _dox and not dox is cause docker wants a namespace
with at least three chars.
Change-Id: I3ea05c0907fb911aaca96a18215c5a44ce2a6ebc
Allow section to have parent like tox.ini, i.e:
foo:
images:
- image1
foo:bar:
commands:
- blah
would have foo:bar getting the image image1 since dependent of foo
Change-Id: I613db9ed9ac16c978ef8a42a604992ce2205bc08
Try to mimics tox by default with allowing things like :
-e section1,section2
Change-Id: Iab98667c5d26aa80fe31227ded9d21983eb7d7eb
TODO: if none was specified run all targets not the default ones
Try to emulate tox -e type of target/environment.
This works natively in tox.ini as long we have commands to run there
(doesn't support inheritance).
For dox.yml the format has been improved, the format looks now like this :
target1:
images:
commands:
add:
prep:
target2:
images:
commands:
add:
prep:
we still support old format with single target.
Follow up patches in this series improve this implementation.
Change-Id: I2a30aaa63fd4e47fd76f29ed5e5cb025ca326016
For some reasons why but os.getlogin() is broken on containers :
http://stackoverflow.com/questions/4399617/python-os-getlogin-problem
when a user is not controlling the terminal.
Let's use instead pwd.getpwuid instead of os.getlogin which would work
in any cases, and would make the function safer to run under containers.
Change-Id: I0cc62e3d13b0e89a0ea1c166ea3ac06cfcc931b3
The docker -v command takes the directory structure where the
docker itself is running. So when using with osx using boot2docker
or just a ubuntu with docker, we need to use say sshfs or virtual
box additions to first make the osx file system available on the
operating system where docker is running (vm in boot2docker). Then
we need to be able to specify how the osx directory maps to the
directory on the vm using the new --path-map parameter.
Change-Id: I8543c94accf5e809323f0f348e9729e32d942b80
Running into trouble with requirements with greenlet etc. Specifically
for requirements from oslo-incubator.
Change-Id: I6ad3b02f679e7262ad861833d8b4e46fdbd4142c
Adds -k/--keep options to allow the user to keep the test container
around instead of deleting it after the given command completes.
Change-Id: If7063c1a93436f4b477adb9b2c869d4cd027205a
the ini.get() thing is weird between python2 and python3 but it seems
that the fourth argument is unnecessary and not implemented in py3
anyway.
Change-Id: Ic42c3ca144ee9dd1aab372bc7d70bdca34cb7a93
This changes the 'commands' YAML portion to be an array. E.g.:
commands:
- ls
- ps
- echo 'Have you tried turning it off and on again?'
Docker doesn't really support issuing multiple commands to a container
on the command line very well. You have to either munge it with something
like:
sh -c 'ls && ps'
or place all of the commands to execute into a master script, then execute
that script.
This change proposes the second option and creates a master script if the
number of commands is more than one.
The master script file will be created in a .dox subdirectory of the
current directory, and named master_script.sh. Right now, it is created
as a Bourne shell script. We could easily add support later for different
shells.
If the -c option is used, then the command specified is the only command
that will run.
If -c is NOT used, but extra arguments are supplied, these extra arguments
will be used to replace the {posargs} placeholders in tox.ini files. The
extra args are not currently used elsewhere.
This change REMOVES the ability to add extra_args to the end of the
command when {posargs} is NOT present. That does not make sense in
a multi-command situation.
Change-Id: I78dbc0613f5db22cea0ed714f5f30ef0207fac24
The configuration file parsers have a defined API, but we aren't
enforcing use of that. This adds an abstract base class that they
all will now inherit from. Additionally, new tests are added to
ensure the classes inherit from the new base class.
Moves tests for files in the config/ directory into their own
test directory.
Fixes the test class name for the ToxIni tests.
Change-Id: I003b4add6060075676da0f23cc37445ea50ffe88
Popen.communicate returns a tuple (stdoutdata, stderrdata) which implies
the result length check is useless.
Change-Id: Id5ee7328d8e31bf584c9069183213cc8c2a19da1
Replace the pattern:
func(open(...))
by the pattern:
with open(...) as f:
func(f)
It ensures files are closed after use.
Change-Id: I7cdd08993ae4a094d101a1bf68ce700817e7fb92