From 99d459de646fe4315404f5cdfee19605cc56222d Mon Sep 17 00:00:00 2001 From: Caleb Lemoine <21261388+circa10a@users.noreply.github.com> Date: Sun, 10 Mar 2019 19:44:50 -0500 Subject: [PATCH 1/3] add option to skip startup notifications (#259) * add option to skip startup notifications * fix flake8 * fix flake8 --- pyouroboros/config.py | 6 ++++-- pyouroboros/ouroboros.py | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pyouroboros/config.py b/pyouroboros/config.py index 1f430807..92286da0 100644 --- a/pyouroboros/config.py +++ b/pyouroboros/config.py @@ -8,7 +8,7 @@ class Config(object): 'PROMETHEUS_PORT', 'NOTIFIERS', 'REPO_USER', 'REPO_PASS', 'CLEANUP', 'RUN_ONCE', 'CRON', 'INFLUX_URL', 'INFLUX_PORT', 'INFLUX_USERNAME', 'INFLUX_PASSWORD', 'INFLUX_DATABASE', 'INFLUX_SSL', 'INFLUX_VERIFY_SSL', 'DATA_EXPORT', 'SELF_UPDATE', 'LABEL_ENABLE', 'DOCKER_TLS', 'LABELS_ONLY', - 'DRY_RUN', 'HOSTNAME', 'DOCKER_TLS_VERIFY', 'SWARM'] + 'DRY_RUN', 'HOSTNAME', 'DOCKER_TLS_VERIFY', 'SWARM', 'SKIP_STARTUP_NOTIFICATIONS'] hostname = environ.get('HOSTNAME') interval = 300 @@ -45,6 +45,7 @@ class Config(object): influx_database = None notifiers = [] + skip_startup_notifications = False def __init__(self, environment_vars, cli_args): self.cli_args = cli_args @@ -91,7 +92,8 @@ def parse(self): except ValueError as e: print(e) elif option in ['CLEANUP', 'RUN_ONCE', 'INFLUX_SSL', 'INFLUX_VERIFY_SSL', 'DRY_RUN', 'SWARM', - 'SELF_UPDATE', 'LABEL_ENABLE', 'DOCKER_TLS', 'LABELS_ONLY', 'DOCKER_TLS_VERIFY']: + 'SELF_UPDATE', 'LABEL_ENABLE', 'DOCKER_TLS', 'LABELS_ONLY', 'DOCKER_TLS_VERIFY', + 'SKIP_STARTUP_NOTIFICATIONS']: if env_opt.lower() in ['true', 'yes']: setattr(self, option.lower(), True) elif env_opt.lower() in ['false', 'no']: diff --git a/pyouroboros/ouroboros.py b/pyouroboros/ouroboros.py index 3b64ae2f..6e53b253 100644 --- a/pyouroboros/ouroboros.py +++ b/pyouroboros/ouroboros.py @@ -131,6 +131,10 @@ def main(): data_group.add_argument('-V', '--influx-verify-ssl', default=Config.influx_verify_ssl, dest='INFLUX_VERIFY_SSL', action='store_true', help='Verify SSL certificate when connecting to influxdb') + docker_group.add_argument('--skip-startup-notifications', default=Config.skip_startup_notifications, + dest='SKIP_STARTUP_NOTIFICATIONS', action='store_true', + help='Do not send ouroboros notifications when starting') + args = parser.parse_args() if environ.get('LOG_LEVEL'): @@ -194,7 +198,8 @@ def main(): now = datetime.now(timezone.utc).astimezone() next_run = (now + timedelta(0, config.interval)).strftime("%Y-%m-%d %H:%M:%S") - notification_manager.send(kind='startup', next_run=next_run) + if not config.skip_startup_notifications: + notification_manager.send(kind='startup', next_run=next_run) while scheduler.get_jobs(): sleep(1) From 545cf0408307aa8a78ab88908a10c3579fdbab0b Mon Sep 17 00:00:00 2001 From: Caleb Lemoine <21261388+circa10a@users.noreply.github.com> Date: Sun, 10 Mar 2019 19:49:10 -0500 Subject: [PATCH 2/3] Revert "add option to skip startup notifications (#259)" (#260) This reverts commit 99d459de646fe4315404f5cdfee19605cc56222d. --- pyouroboros/config.py | 6 ++---- pyouroboros/ouroboros.py | 7 +------ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/pyouroboros/config.py b/pyouroboros/config.py index 92286da0..1f430807 100644 --- a/pyouroboros/config.py +++ b/pyouroboros/config.py @@ -8,7 +8,7 @@ class Config(object): 'PROMETHEUS_PORT', 'NOTIFIERS', 'REPO_USER', 'REPO_PASS', 'CLEANUP', 'RUN_ONCE', 'CRON', 'INFLUX_URL', 'INFLUX_PORT', 'INFLUX_USERNAME', 'INFLUX_PASSWORD', 'INFLUX_DATABASE', 'INFLUX_SSL', 'INFLUX_VERIFY_SSL', 'DATA_EXPORT', 'SELF_UPDATE', 'LABEL_ENABLE', 'DOCKER_TLS', 'LABELS_ONLY', - 'DRY_RUN', 'HOSTNAME', 'DOCKER_TLS_VERIFY', 'SWARM', 'SKIP_STARTUP_NOTIFICATIONS'] + 'DRY_RUN', 'HOSTNAME', 'DOCKER_TLS_VERIFY', 'SWARM'] hostname = environ.get('HOSTNAME') interval = 300 @@ -45,7 +45,6 @@ class Config(object): influx_database = None notifiers = [] - skip_startup_notifications = False def __init__(self, environment_vars, cli_args): self.cli_args = cli_args @@ -92,8 +91,7 @@ def parse(self): except ValueError as e: print(e) elif option in ['CLEANUP', 'RUN_ONCE', 'INFLUX_SSL', 'INFLUX_VERIFY_SSL', 'DRY_RUN', 'SWARM', - 'SELF_UPDATE', 'LABEL_ENABLE', 'DOCKER_TLS', 'LABELS_ONLY', 'DOCKER_TLS_VERIFY', - 'SKIP_STARTUP_NOTIFICATIONS']: + 'SELF_UPDATE', 'LABEL_ENABLE', 'DOCKER_TLS', 'LABELS_ONLY', 'DOCKER_TLS_VERIFY']: if env_opt.lower() in ['true', 'yes']: setattr(self, option.lower(), True) elif env_opt.lower() in ['false', 'no']: diff --git a/pyouroboros/ouroboros.py b/pyouroboros/ouroboros.py index 6e53b253..3b64ae2f 100644 --- a/pyouroboros/ouroboros.py +++ b/pyouroboros/ouroboros.py @@ -131,10 +131,6 @@ def main(): data_group.add_argument('-V', '--influx-verify-ssl', default=Config.influx_verify_ssl, dest='INFLUX_VERIFY_SSL', action='store_true', help='Verify SSL certificate when connecting to influxdb') - docker_group.add_argument('--skip-startup-notifications', default=Config.skip_startup_notifications, - dest='SKIP_STARTUP_NOTIFICATIONS', action='store_true', - help='Do not send ouroboros notifications when starting') - args = parser.parse_args() if environ.get('LOG_LEVEL'): @@ -198,8 +194,7 @@ def main(): now = datetime.now(timezone.utc).astimezone() next_run = (now + timedelta(0, config.interval)).strftime("%Y-%m-%d %H:%M:%S") - if not config.skip_startup_notifications: - notification_manager.send(kind='startup', next_run=next_run) + notification_manager.send(kind='startup', next_run=next_run) while scheduler.get_jobs(): sleep(1) From 8a8ab1b1ade730a42094fe45a9f5266dbf68f464 Mon Sep 17 00:00:00 2001 From: dirtycajunrice Date: Wed, 24 Apr 2019 20:32:48 -0500 Subject: [PATCH 3/3] v1.4.0 to develop --- CHANGELOG.md | 40 ++++++++++++++++++++++++++++++++++++---- pyouroboros/__init__.py | 2 +- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e0c654b..57c438ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,43 @@ # Change Log -## [1.3.1](https://github.com/pyouroboros/ouroboros/tree/1.3.1) (2019-02-27) -[Full Changelog](https://github.com/pyouroboros/ouroboros/compare/1.3.0...1.3.1) +## [1.4.0](https://github.com/pyouroboros/ouroboros/tree/1.4.0) (2019-04-24) +[Full Changelog](https://github.com/pyouroboros/ouroboros/compare/1.3.1...1.4.0) + +**Implemented enhancements:** + +- Make startup notification optional [\#253](https://github.com/pyouroboros/ouroboros/issues/253) **Fixed bugs:** -- Since 1.3.0, docker login fails [\#243](https://github.com/pyouroboros/ouroboros/issues/243) +- Missing MANIFEST.in file causes pypi install to fail [\#284](https://github.com/pyouroboros/ouroboros/issues/284) +- Healthcheck section not re-applied after container update [\#275](https://github.com/pyouroboros/ouroboros/issues/275) +- docker-compose local and remote tls logger location [\#273](https://github.com/pyouroboros/ouroboros/issues/273) +- Self update errors. Not deleting old self [\#262](https://github.com/pyouroboros/ouroboros/issues/262) +- ouroboros sets fixed IP addresses [\#254](https://github.com/pyouroboros/ouroboros/issues/254) **Closed issues:** -- Issue when updating containers that use "--net=container" [\#245](https://github.com/pyouroboros/ouroboros/issues/245) +- Update apprise to v0.7.4 [\#266](https://github.com/pyouroboros/ouroboros/issues/266) [[cleanup](https://github.com/pyouroboros/ouroboros/labels/cleanup)] +- Docker TLS verify: Does it support server and client-side auth, or only server-side auth? [\#256](https://github.com/pyouroboros/ouroboros/issues/256) [[documentation](https://github.com/pyouroboros/ouroboros/labels/documentation)] + +**Other Pull Requests** + +- v1.4.0 Merge [\#298](https://github.com/pyouroboros/ouroboros/pull/298) ([DirtyCajunRice](https://github.com/DirtyCajunRice)) +- v1.4.0 to develop [\#297](https://github.com/pyouroboros/ouroboros/pull/297) ([DirtyCajunRice](https://github.com/DirtyCajunRice)) +- Patches [\#295](https://github.com/pyouroboros/ouroboros/pull/295) ([DirtyCajunRice](https://github.com/DirtyCajunRice)) +- Fix healthcheck attr [\#294](https://github.com/pyouroboros/ouroboros/pull/294) ([circa10a](https://github.com/circa10a)) +- Patch/catch up [\#271](https://github.com/pyouroboros/ouroboros/pull/271) ([DirtyCajunRice](https://github.com/DirtyCajunRice)) +- Arg skip startup notifications [\#261](https://github.com/pyouroboros/ouroboros/pull/261) ([circa10a](https://github.com/circa10a)) +- Revert "add option to skip startup notifications" [\#260](https://github.com/pyouroboros/ouroboros/pull/260) ([circa10a](https://github.com/circa10a)) +- add option to skip startup notifications [\#259](https://github.com/pyouroboros/ouroboros/pull/259) ([circa10a](https://github.com/circa10a)) + +## [1.3.1](https://github.com/pyouroboros/ouroboros/tree/1.3.1) (2019-02-28) +[Full Changelog](https://github.com/pyouroboros/ouroboros/compare/1.3.0...1.3.1) + +**Fixed bugs:** + +- Since 1.3.0, docker login fails [\#243](https://github.com/pyouroboros/ouroboros/issues/243) +- Catch Failed self-updates [\#230](https://github.com/pyouroboros/ouroboros/issues/230) **Other Pull Requests** @@ -435,6 +463,10 @@ - the less code the better [\#8](https://github.com/pyouroboros/ouroboros/pull/8) ([circa10a](https://github.com/circa10a)) - Initial stuff [\#6](https://github.com/pyouroboros/ouroboros/pull/6) ([circa10a](https://github.com/circa10a)) +**Closed issues:** + +- Create good docs [\#7](https://github.com/pyouroboros/ouroboros/issues/7) [[documentation](https://github.com/pyouroboros/ouroboros/labels/documentation)] + **Other Pull Requests** - Docs [\#21](https://github.com/pyouroboros/ouroboros/pull/21) [[documentation](https://github.com/pyouroboros/ouroboros/labels/documentation)] ([circa10a](https://github.com/circa10a)) diff --git a/pyouroboros/__init__.py b/pyouroboros/__init__.py index d93a1db6..9c727ea6 100644 --- a/pyouroboros/__init__.py +++ b/pyouroboros/__init__.py @@ -1,2 +1,2 @@ VERSION = "1.4.0" -BRANCH = "develop" +BRANCH = "master"