Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan-Ailenei committed May 20, 2019
2 parents d6f89b7 + 2f2d95f commit 0809825
Show file tree
Hide file tree
Showing 34 changed files with 421 additions and 420 deletions.
12 changes: 11 additions & 1 deletion .bumpversion.cfg
@@ -1,11 +1,21 @@
[bumpversion]
current_version = 1.6.0
current_version = 1.7.0
commit = True
tag = True

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'

[bumpversion:file:README.rst]
search = v{current_version}.
replace = v{new_version}.

[bumpversion:file:docs/conf.py]
search = version = release = '{current_version}'
replace = version = release = '{new_version}'

[bumpversion:file:src/holdup/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

46 changes: 25 additions & 21 deletions .cookiecutterrc
@@ -1,35 +1,39 @@
# Generated by cookiepatcher, a small shim around cookiecutter (pip install cookiepatcher)

cookiecutter:
appveyor: 'yes'
c_extension_cython: 'no'
c_extension_optional: 'no'
c_extension_support: 'no'
codacy: 'no'
codeclimate: 'no'
codecov: 'yes'
command_line_interface: plain
_template: cookiecutter-pylibrary
appveyor: no
c_extension_function: longest
c_extension_module: _holdup
c_extension_optional: no
c_extension_support: no
codacy: no
codeclimate: no
codecov: yes
command_line_interface: argparse
command_line_interface_bin_name: holdup
coveralls: 'no'
coveralls: yes
distribution_name: holdup
email: contact@ionelmc.ro
full_name: Ionel Cristian Mărieș
github_username: ionelmc
landscape: 'no'
landscape: no
license: BSD 2-Clause License
linter: flake8
package_name: holdup
project_name: Holdup
project_short_description: A tool to wait for services and execute command. Useful
for Docker containers that depend on slow to start services (like almost everything).
release_date: '2017-02-21'
project_short_description: A tool to wait for services and execute command. Useful for Docker containers that depend on slow to start services (like almost everything).
release_date: '2018-03-22'
repo_name: python-holdup
requiresio: 'yes'
scrutinizer: 'no'
sphinx_doctest: 'no'
requiresio: yes
scrutinizer: no
sphinx_docs: yes
sphinx_doctest: no
sphinx_theme: sphinx-py3doc-enhanced-theme
test_matrix_configurator: 'no'
test_matrix_separate_coverage: 'no'
test_matrix_configurator: no
test_matrix_separate_coverage: no
test_runner: pytest
travis: 'yes'
version: 1.3.0
travis: yes
version: 1.6.0
website: https://blog.ionelmc.ro
year: 2016-2017
year: 2016-2018
4 changes: 2 additions & 2 deletions .coveragerc
@@ -1,7 +1,7 @@
[paths]
source =
src/holdup
*/site-packages/holdup
src
*/site-packages

[run]
branch = true
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -29,6 +29,7 @@ pip-log.txt
.coverage
.tox
.coverage.*
.pytest_cache/
nosetests.xml
coverage.xml
htmlcov
Expand Down Expand Up @@ -62,3 +63,6 @@ docs/_build
.bootstrap
.appveyor.token
*.bak

# Mypy Cache
.mypy_cache/
45 changes: 36 additions & 9 deletions .travis.yml
Expand Up @@ -7,26 +7,32 @@ env:
- SEGFAULT_SIGNALS=all
matrix:
- TOXENV=check
- TOXENV=docs
matrix:
include:
- python: '2.7'
env:
- TOXENV=py27,report,codecov
- python: '3.3'
env:
- TOXENV=py33,report,codecov
- TOXENV=py27,report,coveralls,codecov
- python: '3.4'
env:
- TOXENV=py34,report,codecov
- TOXENV=py34,report,coveralls,codecov
- python: '3.5'
env:
- TOXENV=py35,report,codecov
- TOXENV=py35,report,coveralls,codecov
- python: '3.6'
env:
- TOXENV=py36,report,codecov
- python: 'pypy-5.4'
- TOXENV=py36,report,coveralls,codecov
- python: '3.7'
dist: xenial
sudo: required
env:
- TOXENV=py37,report,coveralls,codecov
- python: 'pypy'
env:
- TOXENV=pypy,report,coveralls,codecov
- python: 'pypy3'
env:
- TOXENV=pypy,report,codecov
- TOXENV=pypy3,report,coveralls,codecov
before_install:
- python --version
- uname -a
Expand All @@ -37,6 +43,27 @@ install:
- easy_install --version
- pip --version
- tox --version
- |
set -ex
if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then
(cd $HOME
wget https://bitbucket.org/pypy/pypy/downloads/pypy2-v6.0.0-linux64.tar.bz2
tar xf pypy2-*.tar.bz2
pypy2-*/bin/pypy -m ensurepip
pypy2-*/bin/pypy -m pip install -U virtualenv)
export PATH=$(echo $HOME/pypy2-*/bin):$PATH
export TOXPYTHON=$(echo $HOME/pypy2-*/bin/pypy)
fi
if [[ $TRAVIS_PYTHON_VERSION == 'pypy3' ]]; then
(cd $HOME
wget https://bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-linux64.tar.bz2
tar xf pypy3-*.tar.bz2
pypy3-*/bin/pypy3 -m ensurepip
pypy3-*/bin/pypy3 -m pip install -U virtualenv)
export PATH=$(echo $HOME/pypy3-*/bin):$PATH
export TOXPYTHON=$(echo $HOME/pypy3-*/bin/pypy3)
fi
set +x
script:
- tox -v
after_failure:
Expand Down
1 change: 1 addition & 0 deletions AUTHORS.rst
Expand Up @@ -3,3 +3,4 @@ Authors
=======

* Ionel Cristian Mărieș - https://blog.ionelmc.ro
* Mithun Ayachit
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -2,6 +2,12 @@
Changelog
=========

1.7.0 (2018-11-24)
------------------

* Added support for skipping SSL certificate verification for HTTPS services
(the ``--insecure`` option and ``https+insecure`` protocol).
Contributed by Mithun Ayachit in `#2 <https://github.com/ionelmc/python-holdup/pull/2>`_.

1.6.0 (2018-03-22)
------------------
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Expand Up @@ -83,7 +83,7 @@ Tips

To run a subset of tests::

tox -e envname -- py.test -k test_myfeature
tox -e envname -- pytest -k test_myfeature

To run all the test environments in *parallel* (you need to ``pip install detox``)::

Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in
@@ -1,5 +1,4 @@
graft docs
graft examples
graft src
graft ci
graft tests
Expand All @@ -8,7 +7,6 @@ include .bumpversion.cfg
include .coveragerc
include .cookiecutterrc
include .editorconfig
include .isort.cfg

include AUTHORS.rst
include CHANGELOG.rst
Expand Down
45 changes: 31 additions & 14 deletions README.rst
Expand Up @@ -7,9 +7,11 @@ Overview
.. list-table::
:stub-columns: 1

* - docs
- |docs|
* - tests
- | |travis| |appveyor| |requires|
| |codecov|
- | |travis| |requires|
| |coveralls| |codecov|
* - package
- | |version| |wheel| |supported-versions| |supported-implementations|
| |commits-since|
Expand All @@ -18,18 +20,19 @@ Overview
:target: https://readthedocs.org/projects/python-holdup
:alt: Documentation Status


.. |travis| image:: https://travis-ci.org/ionelmc/python-holdup.svg?branch=master
:alt: Travis-CI Build Status
:target: https://travis-ci.org/ionelmc/python-holdup

.. |appveyor| image:: https://ci.appveyor.com/api/projects/status/github/ionelmc/python-holdup?branch=master&svg=true
:alt: AppVeyor Build Status
:target: https://ci.appveyor.com/project/ionelmc/python-holdup

.. |requires| image:: https://requires.io/github/ionelmc/python-holdup/requirements.svg?branch=master
:alt: Requirements Status
:target: https://requires.io/github/ionelmc/python-holdup/requirements/?branch=master

.. |coveralls| image:: https://coveralls.io/repos/ionelmc/python-holdup/badge.svg?branch=master&service=github
:alt: Coverage Status
:target: https://coveralls.io/r/ionelmc/python-holdup

.. |codecov| image:: https://codecov.io/github/ionelmc/python-holdup/coverage.svg?branch=master
:alt: Coverage Status
:target: https://codecov.io/github/ionelmc/python-holdup
Expand All @@ -38,9 +41,9 @@ Overview
:alt: PyPI Package latest release
:target: https://pypi.python.org/pypi/holdup

.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-holdup/v1.6.0.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-holdup/v1.7.0.svg
:alt: Commits since latest release
:target: https://github.com/ionelmc/python-holdup/compare/v1.6.0...master
:target: https://github.com/ionelmc/python-holdup/compare/v1.7.0...master

.. |wheel| image:: https://img.shields.io/pypi/wheel/holdup.svg
:alt: PyPI Wheel
Expand All @@ -60,7 +63,7 @@ Overview
A tool to wait for services and execute command. Useful for Docker containers that depend on slow to start services
(like almost everything).

* Free software: BSD license
* Free software: BSD 2-Clause License

Installation
============
Expand All @@ -72,7 +75,7 @@ Installation
Documentation
=============

Usage: ``holdup [-h] [-t SECONDS] [-T SECONDS] [-i SECONDS] [-n] service [service ...] [-- command [arg [arg ...]]]``
Usage: ``holdup [-h] [-t SECONDS] [-T SECONDS] [-i SECONDS] [-n] [--insecure] service [service ...] [-- command [arg [arg ...]]]``

Wait for services to be ready and optionally exec command.

Expand All @@ -81,7 +84,7 @@ Positional arguments:
A service to wait for. Supported protocols:
"tcp://host:port/", "path:///path/to/something",
"unix:///path/to/domain.sock", "eval://expr",
"http://urn", "http://urn" (status 200 expected). Join
"http://urn", "http://urn", "https+insecure//urn" (status 200 expected). Join
protocols with a comma to make holdup exit at the
first passing one, eg: tcp://host:1,host:2 or
tcp://host:1,tcp://host:2 are equivalent and mean "any
Expand All @@ -93,13 +96,14 @@ Positional arguments:
Optional arguments:
-h, --help show this help message and exit
-t SECONDS, --timeout SECONDS
Time to wait for services to be ready. Default: 5.0
Time to wait for services to be ready. Default: 60.0
-T SECONDS, --check-timeout SECONDS
Time to wait for a single check. Default: 1.0
-i SECONDS, --interval SECONDS
How often to check. Default: 0.2
-n, --no-abort Ignore failed services. This makes `holdup` return 0
exit code regardless of services actually responding.
--insecure Skip SSL Certificate verification for HTTPS services.

Suggested use
-------------
Expand All @@ -108,8 +112,8 @@ Assuming you always want the container to wait add this in your ``Dockerfile``::

COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/bin/bash"]
CMD ["/bin/bash"]

Then in ``entrypoint.sh`` you could have::

#!/bin/sh
Expand All @@ -122,6 +126,19 @@ Then in ``entrypoint.sh`` you could have::

The only disadvantage is that you might occasionally need to use ``docker run --entrypoint=''`` to avoid running holdup. No biggie.

Insecure HTTPS Service Checks
-------------------------------

You may choose to skip SSL validation when waiting for an HTTPS service (for e.g., when using an IP Address). This can be done using either of the following methods::

# Specifying a https+insecure protocol
holdup https+insecure://10.1.2.3/

# Specifying the --insecure` option
holdup --insecure https://10.1.2.3/

Skipping SSL Certificate verification requires a minimum of Python-2.7.9 or Python-3.4.3.

Development
===========

Expand Down

0 comments on commit 0809825

Please sign in to comment.