Browse Source

Bootstrap testing for project

Change-Id: Ie2293fa34d5f087d669a662570053d09024a6e72
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
changes/55/763055/5
Paul Belanger 2 years ago
parent
commit
7980519eb1
  1. 4
      .gitignore
  2. 14
      .yamllint
  3. 8
      .zuul.yaml
  4. 51
      README.rst
  5. 7
      doc/requirements.txt
  6. 73
      doc/source/conf.py
  7. 1
      doc/source/index.rst
  8. 1
      requirements.txt
  9. 1
      test-requirements.txt
  10. 32
      tox.ini

4
.gitignore vendored

@ -0,0 +1,4 @@
.tox/
AUTHORS
ChangeLog
doc/build/

14
.yamllint

@ -0,0 +1,14 @@
---
extends: default
ignore: |
.tox
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
line-length: disable

8
.zuul.yaml

@ -0,0 +1,8 @@
---
- project:
check:
jobs:
- tox-linters
gate:
jobs:
- tox-linters

51
README.rst

@ -0,0 +1,51 @@
==========================
ansible-role-zuul-registry
==========================
Ansible role to manage zuul-registry
* License: Apache License, Version 2.0
* Documentation: https://ansible-role-zuul-registry.readthedocs.org
* Source: https://opendev.org/windmill/ansible-role-zuul-registry
* Bugs: https://bugs.launchpad.net/ansible-role-zuul-registry
Description
-----------
This is a container image registry for use with the Zuul project gating system.
The defining feature of this registry is support for shadowing images: it
allows you to upload a local version of an image to use instead of an upstream
version. If you pull an image from this registry, it will provide the local
version if it exists, or the upstream if it does not.
Requirements
------------
* pip3 to be installed if using zuul_registry_install_method: (git|pip)
Packages
~~~~~~~~
Package repository index files should be up to date before using this role, we
do not manage them.
Role Variables
--------------
.. literalinclude:: ../../defaults/main.yaml
:language: yaml
:start-after: under the License.
Dependencies
------------
Example Playbook
----------------
.. code-block:: yaml
- name: Install zuul-registry
hosts: zuul-registry
roles:
- ansible-role-zuul-registry

7
doc/requirements.txt

@ -0,0 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
# this is required for the docs build jobs
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
doc8>=0.6.0 # Apache-2.0

73
doc/source/conf.py

@ -0,0 +1,73 @@
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable
# The suffix of source filenames.
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'ansible-role-zuul-registry'
copyright = u'2013, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
# html_static_path = ['static']
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
]
# Example configuration for intersphinx: refer to the Python standard library.
# intersphinx_mapping = {'http://docs.python.org/': None}

1
doc/source/index.rst

@ -0,0 +1 @@
.. include:: ../../README.rst

1
requirements.txt

@ -0,0 +1 @@
ansible>=2.4.0

1
test-requirements.txt

@ -0,0 +1 @@
yamllint

32
tox.ini

@ -0,0 +1,32 @@
[tox]
minversion = 1.4.2
envlist = docs,linters
skipsdist = True
[testenv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
whitelist_externals =
bash
commands=
bash -c "rm -rf doc/build"
doc8 doc
sphinx-build -b html doc/source doc/build/html
[testenv:venv]
commands = {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:linters]
commands =
yamllint -s .
Loading…
Cancel
Save