Commit Graph

105 Commits

Author SHA1 Message Date
Andreas Jaeger 06e67f317d Retire dox repository
This change removes all content from the repository and adds the usual
README file to point out that the repository is retired following the
process from
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project

Depends-On: https://review.opendev.org/701446
Change-Id: I49ddca0f6c4a5d0e546e22a5515d405f0e869eab
2020-01-07 20:53:40 +01:00
OpenDev Sysadmins 3087d31254 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:50:39 +00:00
Paul Belanger a842b2db46
Add ubuntu-xenial docker image
Change-Id: I8cc2229b2b4b3ef01b1d4992232255367b7c251f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-04-27 15:17:55 -04:00
Paul Belanger 9bc1b0368e
Ensure we can build docker images
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>
2017-04-27 15:06:42 -04:00
Paul Belanger 0844eff011
Add bindep.txt support
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>
2017-04-27 12:12:13 -04:00
Jenkins 62902e57c1 Merge "Remove tox py26 and pypi" 2017-03-22 02:53:18 +00:00
Jenkins f3d7a5f0b1 Merge "Replace assertEqual(None, *) with assertIsNone in tests" 2017-03-22 02:37:23 +00:00
Jenkins 9b3bc6a66b Merge "Removed utf-8 coding" 2017-03-22 02:37:17 +00:00
Paul Belanger e8434e423e Remove tox py26 and pypi
No need to support these now.

Change-Id: I53d0adc5357eb75abfeedaf1922cf9165087555e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-03-21 22:30:57 -04:00
Jenkins 2927d76059 Merge "Update .gitreview for new namespace" 2017-03-21 22:48:33 +00:00
Kalaswan Datta aafa2bb988 Removed utf-8 coding
Change-Id: Icc8a880de7ae2ab1718059814bd3c1ba776c4bf7
2017-01-07 10:10:29 -05:00
Andreas Jaeger be9aa268bd Remove argparse from requirements
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
2016-01-20 19:14:04 +01:00
zhangguoqing a515b0a900 Replace assertEqual(None, *) with assertIsNone in tests
Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.

Change-Id: I0dfc37bd9aad42914e1cd4b2bfadb71358d62bf4
Closes-bug: #1280522
2016-01-12 09:27:02 +00:00
Jon Skarpeteig 32443f48fb Remove docker debug output polluting the view
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
2015-12-17 13:29:03 +01:00
Jeremy Stanley 12862c4aa4 Update .gitreview for new namespace
Change-Id: I51d8707faaad2f122fffec2ac5d4a0f0a065a98e
2015-10-17 22:07:51 +00:00
Monty Taylor 22e3b4fa0e Change ignore-errors to ignore_errors
Needed for coverage 4.0

Change-Id: Ib79f040ca18d8a2ef96e5a45e7e49e4a55de60a2
2015-09-21 14:58:25 +00:00
Flavio Percoco b0573a41a8 Adding release notes for 0.2.0
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
2015-09-18 14:24:05 +02:00
Flavio Percoco dffe39167b Don't prefix the cached image with `_`
Newer docker versions don't allow images' names starting with `_`. This
patch removes the `_` prefix from the code.

Change-Id: Ibbc82f0c8c86c149835f66f84f1664b347ae76c1
2015-08-28 20:57:57 +02:00
Flavio Percoco ea141b9715 Don't run useradd for root
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
2015-08-18 00:47:29 +02:00
Jenkins 1f63004479 Merge "More informative error when command fails" 2015-08-09 04:59:16 +00:00
Swapnil Kulkarni d3971df8c6 Add Centos 7 Dockerfile
Change-Id: Ibf0cf51c37323a7f1a3673c06f6a4f33195162ce
2015-08-05 07:35:54 +00:00
Marc Abramowitz d0d15f966c More informative error when command fails
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
2015-05-13 08:30:12 -07:00
Jeremy Stanley a02c3f7742 Workflow documentation is now in infra-manual
Replace URLs for workflow documentation to appropriate parts of the
OpenStack Project Infrastructure Manual.

Change-Id: I70e9e78efad4aa6cf593b266513711a49d1f5ace
2014-12-05 03:30:44 +00:00
Chmouel Boudjnah 2997c592e7 Add environement target in image name
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
2014-12-02 19:10:29 +01:00
Chmouel Boudjnah 9f33ae5252 Allow parent section for dox.yaml
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
2014-10-27 15:20:36 +00:00
Chmouel Boudjnah 336d174cee Add test for dox.cmd
Change-Id: Ifc765aac66281d60fde6aaed17e7eb8e1f2cf247
2014-10-27 15:19:23 +00:00
Jenkins a550f76774 Merge "Allow running multiple target with -e" 2014-10-27 13:45:11 +00:00
Jenkins 1229eeb21c Merge "Allow multiple targets in dox.yml" 2014-10-27 13:44:57 +00:00
Chmouel Boudjnah 6e48f91bde Update doc for 1.3 bootdocker
Change-Id: Ib5bb960de9dc76b2a87b3bed916da77519453e22
2014-10-21 09:10:00 +02:00
Chmouel Boudjnah cea9aa0053 Allow running multiple target with -e
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
2014-10-16 17:47:14 +00:00
Chmouel Boudjnah af4113abc2 Allow multiple targets in dox.yml
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
2014-10-15 14:17:22 +00:00
Chmouel Boudjnah 94fe98a0d0 Add more tests with runner
Change-Id: If3ccae3bf6b2579267a862d12d6149523fed81cd
2014-10-14 21:53:04 +00:00
Chmouel Boudjnah e06b41a069 Use pwd.getpwuid() to get login
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
2014-10-14 21:47:35 +00:00
Davanum Srinivas 51bd5fede5 Ability to specify mount path mapping from osx->vm->docker
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
2014-10-14 12:28:45 -04:00
Davanum Srinivas 43a68e3c66 Add python-dev to trusty image
Running into trouble with requirements with greenlet etc. Specifically
for requirements from oslo-incubator.

Change-Id: I6ad3b02f679e7262ad861833d8b4e46fdbd4142c
2014-10-13 12:48:20 -04:00
Jenkins 6d4ae348d8 Merge "--rm needs to be after the image or it would fail" 2014-10-08 21:17:29 +00:00
Chmouel Boudjnah 9e8b302aa7 --rm needs to be after the image or it would fail
When running an image in docker the image needs to be the last argument.

Change-Id: I1157b5a689c80339af2a3e10680d360b332c24f0
2014-10-08 23:00:26 +02:00
Jenkins 0a9ef7bf4e Merge "Fix py3 compatibility" 2014-10-08 20:51:56 +00:00
Jenkins 3091e11959 Merge "Add option to keep test container" 2014-10-03 18:48:50 +00:00
Chmouel Boudjnah 91d578466a Ignore dox
Change-Id: I2334858884a2560d81656f65f082a677eede758d
2014-10-03 16:41:43 +02:00
David Shrewsbury be61a19eff Add option to keep test container
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
2014-10-03 10:13:18 -04:00
Chmouel Boudjnah 52209d8f05 Fix py3 compatibility
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
2014-10-02 15:18:40 +02:00
Chmouel Boudjnah 92fad2c7a7 Add information about boot2docker in README
Change-Id: I7bdfb0da5534a8b3f0a2062a878ff488940743d1
2014-10-01 12:48:16 +00:00
Chmouel Boudjnah 44c10cd57c Allow use another usename than current user
Useful for boot2docker

Change-Id: I1e345a8d8ed05d723f419764401ba564ee900c01
2014-10-01 13:02:19 +02:00
Chmouel Boudjnah 769e05c696 Set commands on dox.yml of dox to a list
Change-Id: I75df883ba2e6d7f8210b0ef3f0a17dff3ab74370
2014-10-01 13:02:19 +02:00
David Shrewsbury 0339a34458 Better support for multiple commands
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
2014-09-26 12:20:54 -04:00
David Shrewsbury a21659d31e Use base class for config file parsers
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
2014-09-25 11:50:00 -04:00
Jenkins 629ef2d69d Merge "Close files after use" 2014-09-25 15:43:08 +00:00
Cedric Brandily 5aeb94e112 Simplify Popen.communicate() result parsing
Popen.communicate returns a tuple (stdoutdata, stderrdata) which implies
the result length check is useless.

Change-Id: Id5ee7328d8e31bf584c9069183213cc8c2a19da1
2014-09-25 14:49:22 +02:00
Cedric Brandily 20e9713de0 Close files after use
Replace the pattern:

  func(open(...))

by the pattern:

  with open(...) as f:
    func(f)

It ensures files are closed after use.

Change-Id: I7cdd08993ae4a094d101a1bf68ce700817e7fb92
2014-09-25 14:36:47 +02:00