From 51b445b941a82ecd120146c25f4a44a0046eb0f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 15 Apr 2019 17:52:25 +0000 Subject: [PATCH 01/30] Bump pytest from 4.4.0 to 4.4.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 4.4.0 to 4.4.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/4.4.0...4.4.1) Signed-off-by: dependabot[bot] --- requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/test.txt b/requirements/test.txt index 0fe3af8a0..244124011 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,6 +1,6 @@ mock==2.0.0 pytest==3.2.5;python_version=="2.6" or python_version=="3.3" # pyup: ==3.2.5 -pytest==4.4.0;python_version=="2.7" or python_version>="3.4" +pytest==4.4.1;python_version=="2.7" or python_version>="3.4" pytest-travis-fold==1.3.0 pytest-catchlog==1.2.2;python_version=="2.6" pytest-cov==2.5.1;python_version=="2.6" # pyup: ==2.5.1 From 722f2bbbe72bef70d45939b2e5a9511e4c6f66de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Apr 2019 06:23:27 +0000 Subject: [PATCH 02/30] Bump src/watchmaker/static/salt/formulas/dotnet4-formula Bumps [src/watchmaker/static/salt/formulas/dotnet4-formula](https://github.com/plus3it/dotnet4-formula) from `5c47fb0` to `00b01d2`. - [Release notes](https://github.com/plus3it/dotnet4-formula/releases) - [Commits](https://github.com/plus3it/dotnet4-formula/compare/5c47fb02eff2e0f0efffcb35d62b43b05343c850...00b01d24ad0ea2d649c580953090f99237e66588) Signed-off-by: dependabot[bot] --- src/watchmaker/static/salt/formulas/dotnet4-formula | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/watchmaker/static/salt/formulas/dotnet4-formula b/src/watchmaker/static/salt/formulas/dotnet4-formula index 5c47fb02e..00b01d24a 160000 --- a/src/watchmaker/static/salt/formulas/dotnet4-formula +++ b/src/watchmaker/static/salt/formulas/dotnet4-formula @@ -1 +1 @@ -Subproject commit 5c47fb02eff2e0f0efffcb35d62b43b05343c850 +Subproject commit 00b01d24ad0ea2d649c580953090f99237e66588 From d72f627a0d1edd151afef12906b212b2e8137536 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 17 Apr 2019 17:36:44 +0000 Subject: [PATCH 03/30] Bump pytest-mock from 1.10.3 to 1.10.4 Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 1.10.3 to 1.10.4. - [Release notes](https://github.com/pytest-dev/pytest-mock/releases) - [Changelog](https://github.com/pytest-dev/pytest-mock/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-mock/compare/v1.10.3...1.10.4) Signed-off-by: dependabot[bot] --- requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/test.txt b/requirements/test.txt index 244124011..2872e3694 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -6,5 +6,5 @@ pytest-catchlog==1.2.2;python_version=="2.6" pytest-cov==2.5.1;python_version=="2.6" # pyup: ==2.5.1 pytest-cov==2.6.1;python_version>="2.7" pytest-mock==1.6.3;python_version=="2.6" # pyup: ==1.6.3 -pytest-mock==1.10.3;python_version>="2.7" +pytest-mock==1.10.4;python_version>="2.7" wheel==0.29.0;python_version<="2.6" # pyup: ==0.29.0 From e2b04d97f7c7d702b4ac68cde1e424edebcc561e Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Fri, 19 Apr 2019 06:29:46 -0400 Subject: [PATCH 04/30] Restricts backoff version to retain compatibility with python2.6 --- setup.cfg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index b05bf8616..bb044a59d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,7 +31,8 @@ classifiers = [options] install_requires = - backoff + backoff;python_version>="2.7" + backoff<1.7;python_version<"2.7" click;python_version>="2.7" click<7;python_version<"2.7" defusedxml;platform_system=="Windows" @@ -39,7 +40,7 @@ install_requires = six pypiwin32;platform_system=="Windows" PyYAML;python_version>="2.7" - PyYAML<4;python_version<"2.7" + PyYAML<4;python_version<"2.7" wheel<=0.29.0;python_version<"2.7" packages = find: include_package_data = True From 51997181c12cbdea3500e07d46e2bd86eebdba14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 22 Apr 2019 14:29:44 +0000 Subject: [PATCH 05/30] Bump satsuki from 0.1.13 to 0.1.14 Bumps [satsuki](https://github.com/plus3it/satsuki) from 0.1.13 to 0.1.14. - [Release notes](https://github.com/plus3it/satsuki/releases) - [Changelog](https://github.com/plus3it/satsuki/blob/master/CHANGELOG.rst) - [Commits](https://github.com/plus3it/satsuki/compare/0.1.13...0.1.14) Signed-off-by: dependabot[bot] --- requirements/deploy.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/deploy.txt b/requirements/deploy.txt index d0e244531..4d5429bc8 100644 --- a/requirements/deploy.txt +++ b/requirements/deploy.txt @@ -1 +1 @@ -satsuki==0.1.13 +satsuki==0.1.14 From 8ba19eebcf0f034dc8f49debe61768aa970e700b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 23 Apr 2019 09:42:53 +0000 Subject: [PATCH 06/30] Bump check-manifest from 0.37 to 0.38 Bumps [check-manifest](https://github.com/mgedmin/check-manifest) from 0.37 to 0.38. - [Release notes](https://github.com/mgedmin/check-manifest/releases) - [Changelog](https://github.com/mgedmin/check-manifest/blob/master/CHANGES.rst) - [Commits](https://github.com/mgedmin/check-manifest/compare/0.37...0.38) Signed-off-by: dependabot[bot] --- requirements/check.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/check.txt b/requirements/check.txt index 9b4d85afb..a6d39c2ff 100644 --- a/requirements/check.txt +++ b/requirements/check.txt @@ -1,4 +1,4 @@ -check-manifest==0.37 +check-manifest==0.38 flake8==3.7.7 flake8-bugbear==19.3.0 flake8-builtins==1.4.1 From a30e05abfcbfa2e9fd636fcde59bbe51f0a6fb66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 24 Apr 2019 19:52:09 +0000 Subject: [PATCH 07/30] Bump pip from 19.0.3 to 19.1 Bumps [pip](https://github.com/pypa/pip) from 19.0.3 to 19.1. - [Release notes](https://github.com/pypa/pip/releases) - [Changelog](https://github.com/pypa/pip/blob/master/NEWS.rst) - [Commits](https://github.com/pypa/pip/compare/19.0.3...19.1) Signed-off-by: dependabot[bot] --- requirements/pip.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/pip.txt b/requirements/pip.txt index b79fbf1bd..5d5f50287 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1 +1 @@ -pip==19.0.3 +pip==19.1 From a3fc60a8141b6bb7ca768b2bc7d058080dc1eb35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 24 Apr 2019 20:27:46 +0000 Subject: [PATCH 08/30] Bump setuptools from 41.0.0 to 41.0.1 Bumps [setuptools](https://github.com/pypa/setuptools) from 41.0.0 to 41.0.1. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/master/docs/history.txt) - [Commits](https://github.com/pypa/setuptools/compare/v41.0.0...v41.0.1) Signed-off-by: dependabot[bot] --- requirements/docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/docs.txt b/requirements/docs.txt index c784a0da5..150676973 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,4 +1,4 @@ m2r==0.2.1 -setuptools==41.0.0 +setuptools==41.0.1 sphinx==2.0.1 sphinx-rtd-theme==0.4.3 From 466f95afad5627b7977b253778314e3ba75e827c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 2 May 2019 06:32:27 +0000 Subject: [PATCH 09/30] Bump isort from 4.3.17 to 4.3.18 Bumps [isort](https://github.com/timothycrosley/isort) from 4.3.17 to 4.3.18. - [Release notes](https://github.com/timothycrosley/isort/releases) - [Changelog](https://github.com/timothycrosley/isort/blob/develop/CHANGELOG.md) - [Commits](https://github.com/timothycrosley/isort/compare/4.3.17...4.3.18) Signed-off-by: dependabot[bot] --- requirements/check.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/check.txt b/requirements/check.txt index a6d39c2ff..f5f0b94a9 100644 --- a/requirements/check.txt +++ b/requirements/check.txt @@ -6,7 +6,7 @@ flake8-docstrings==1.3.0 flake8-isort==2.7.0 flake8-future-import==0.4.5 flake8-print==3.1.0 -isort==4.3.17 +isort==4.3.18 m2r==0.2.1 pep8-naming==0.8.2 pydocstyle==3.0.0 From 9c2f008034d78ec5a8ace70cf25fa401f6e26dcc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 2 May 2019 12:40:24 +0000 Subject: [PATCH 10/30] Bump mock from 2.0.0 to 3.0.3 Bumps [mock](https://github.com/testing-cabal/mock) from 2.0.0 to 3.0.3. - [Release notes](https://github.com/testing-cabal/mock/releases) - [Changelog](https://github.com/testing-cabal/mock/blob/master/CHANGELOG.rst) - [Commits](https://github.com/testing-cabal/mock/compare/2.0.0...3.0.3) Signed-off-by: dependabot[bot] --- requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/test.txt b/requirements/test.txt index 2872e3694..9b920460a 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,4 +1,4 @@ -mock==2.0.0 +mock==3.0.3 pytest==3.2.5;python_version=="2.6" or python_version=="3.3" # pyup: ==3.2.5 pytest==4.4.1;python_version=="2.7" or python_version>="3.4" pytest-travis-fold==1.3.0 From 173007837f3e9444202d380dfbf14646588bba8f Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Thu, 2 May 2019 09:16:03 -0400 Subject: [PATCH 11/30] Fix update for py2.6 --- requirements/test.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements/test.txt b/requirements/test.txt index 9b920460a..38b791d4c 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,4 +1,5 @@ -mock==3.0.3 +mock==2.0.0;python_version=="2.6" # pyup: ==2.0.0 +mock==3.0.3;python_version>="2.7" pytest==3.2.5;python_version=="2.6" or python_version=="3.3" # pyup: ==3.2.5 pytest==4.4.1;python_version=="2.7" or python_version>="3.4" pytest-travis-fold==1.3.0 From 897076fa687ca25112d101e45a49b48f40e0a126 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Fri, 3 May 2019 08:35:00 +0000 Subject: [PATCH 12/30] Bump pytest-cov from 2.6.1 to 2.7.1 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.6.1 to 2.7.1. - [Release notes](https://github.com/pytest-dev/pytest-cov/releases) - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v2.6.1...v2.7.1) Signed-off-by: dependabot[bot] --- requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/test.txt b/requirements/test.txt index 38b791d4c..1a2decb2a 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -5,7 +5,7 @@ pytest==4.4.1;python_version=="2.7" or python_version>="3.4" pytest-travis-fold==1.3.0 pytest-catchlog==1.2.2;python_version=="2.6" pytest-cov==2.5.1;python_version=="2.6" # pyup: ==2.5.1 -pytest-cov==2.6.1;python_version>="2.7" +pytest-cov==2.7.1;python_version>="2.7" pytest-mock==1.6.3;python_version=="2.6" # pyup: ==1.6.3 pytest-mock==1.10.4;python_version>="2.7" wheel==0.29.0;python_version<="2.6" # pyup: ==0.29.0 From f85f749c0d7b350b74b970ca2b372add6b20f7fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Sat, 4 May 2019 13:15:09 +0000 Subject: [PATCH 13/30] Bump mock from 3.0.3 to 3.0.4 Bumps [mock](https://github.com/testing-cabal/mock) from 3.0.3 to 3.0.4. - [Release notes](https://github.com/testing-cabal/mock/releases) - [Changelog](https://github.com/testing-cabal/mock/blob/master/CHANGELOG.rst) - [Commits](https://github.com/testing-cabal/mock/compare/3.0.3...3.0.4) Signed-off-by: dependabot[bot] --- requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/test.txt b/requirements/test.txt index 1a2decb2a..dee7602bf 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,5 @@ mock==2.0.0;python_version=="2.6" # pyup: ==2.0.0 -mock==3.0.3;python_version>="2.7" +mock==3.0.4;python_version>="2.7" pytest==3.2.5;python_version=="2.6" or python_version=="3.3" # pyup: ==3.2.5 pytest==4.4.1;python_version=="2.7" or python_version>="3.4" pytest-travis-fold==1.3.0 From 3493dc4c50388656c1eecbcf209d2ea6ed3061db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 6 May 2019 06:42:39 +0000 Subject: [PATCH 14/30] Bump src/watchmaker/static/salt/formulas/join-domain-formula Bumps [src/watchmaker/static/salt/formulas/join-domain-formula](https://github.com/plus3it/join-domain-formula) from `1fab484` to `8dbfc8c`. - [Release notes](https://github.com/plus3it/join-domain-formula/releases) - [Commits](https://github.com/plus3it/join-domain-formula/compare/1fab4840f9ea75786283666f9c11402c21e22fe3...8dbfc8c8b3b0aecbd8b7bd6033b063343b419674) Signed-off-by: dependabot[bot] --- src/watchmaker/static/salt/formulas/join-domain-formula | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/watchmaker/static/salt/formulas/join-domain-formula b/src/watchmaker/static/salt/formulas/join-domain-formula index 1fab4840f..8dbfc8c8b 160000 --- a/src/watchmaker/static/salt/formulas/join-domain-formula +++ b/src/watchmaker/static/salt/formulas/join-domain-formula @@ -1 +1 @@ -Subproject commit 1fab4840f9ea75786283666f9c11402c21e22fe3 +Subproject commit 8dbfc8c8b3b0aecbd8b7bd6033b063343b419674 From 20c10da1ae184a066f0f0c693b288dc9c5e02648 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 6 May 2019 15:08:04 +0000 Subject: [PATCH 15/30] Bump pip from 19.1 to 19.1.1 Bumps [pip](https://github.com/pypa/pip) from 19.1 to 19.1.1. - [Release notes](https://github.com/pypa/pip/releases) - [Changelog](https://github.com/pypa/pip/blob/master/NEWS.rst) - [Commits](https://github.com/pypa/pip/compare/19.1...19.1.1) Signed-off-by: dependabot[bot] --- requirements/pip.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/pip.txt b/requirements/pip.txt index 5d5f50287..b9b0f5d95 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1 +1 @@ -pip==19.1 +pip==19.1.1 From 31be8d612a693a346062090c12bbc9bf78584a5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 6 May 2019 17:59:33 +0000 Subject: [PATCH 16/30] Bump satsuki from 0.1.14 to 0.1.15 Bumps [satsuki](https://github.com/plus3it/satsuki) from 0.1.14 to 0.1.15. - [Release notes](https://github.com/plus3it/satsuki/releases) - [Changelog](https://github.com/plus3it/satsuki/blob/master/CHANGELOG.rst) - [Commits](https://github.com/plus3it/satsuki/compare/0.1.14...0.1.15) Signed-off-by: dependabot[bot] --- requirements/deploy.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/deploy.txt b/requirements/deploy.txt index 4d5429bc8..541c38ec9 100644 --- a/requirements/deploy.txt +++ b/requirements/deploy.txt @@ -1 +1 @@ -satsuki==0.1.14 +satsuki==0.1.15 From 5dcfe65306b2957bffa5d66c4b0a23de124e9466 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 6 May 2019 23:25:14 +0000 Subject: [PATCH 17/30] Bump gravitybee from 0.1.26 to 0.1.27 Bumps [gravitybee](https://github.com/plus3it/gravitybee) from 0.1.26 to 0.1.27. - [Release notes](https://github.com/plus3it/gravitybee/releases) - [Changelog](https://github.com/plus3it/gravitybee/blob/master/CHANGELOG.rst) - [Commits](https://github.com/plus3it/gravitybee/compare/0.1.26...0.1.27) Signed-off-by: dependabot[bot] --- requirements/build.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/build.txt b/requirements/build.txt index 887c465a9..ba4f57321 100644 --- a/requirements/build.txt +++ b/requirements/build.txt @@ -1 +1 @@ -gravitybee==0.1.26 +gravitybee==0.1.27 From 34a8437282f1da6fa78ae274949a9b08d4abf122 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Fri, 1 Mar 2019 14:06:13 -0500 Subject: [PATCH 18/30] Allow for local salt content --- src/watchmaker/static/config.yaml | 2 +- src/watchmaker/workers/salt.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/watchmaker/static/config.yaml b/src/watchmaker/static/config.yaml index 02e09a4b3..0df10e13e 100644 --- a/src/watchmaker/static/config.yaml +++ b/src/watchmaker/static/config.yaml @@ -5,7 +5,7 @@ all: computer_name: None environment: None ou_path: None - salt_content: https://s3.amazonaws.com/watchmaker/salt-content.zip + salt_content: None salt_states: Highstate user_formulas: # To add extra formulas, specify them as a map of diff --git a/src/watchmaker/workers/salt.py b/src/watchmaker/workers/salt.py index 5dd83a6da..5af2ee2a0 100644 --- a/src/watchmaker/workers/salt.py +++ b/src/watchmaker/workers/salt.py @@ -241,7 +241,7 @@ def _get_formulas_conf(self): ] def _build_salt_formula(self, extract_dir): - if self.salt_content: + if self.salt_content and self.salt_content != 'None': salt_content_filename = watchmaker.utils.basename_from_uri( self.salt_content ) From e70eb3f6ca54ff92426cc592d69e870dd5a7b376 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Thu, 14 Mar 2019 19:49:37 -0400 Subject: [PATCH 19/30] Add tests and move copytree to utils --- src/watchmaker/utils/__init__.py | 8 + src/watchmaker/workers/salt.py | 22 ++- tests/test_saltworker.py | 244 ++++++++++++++++++++++++++++++- 3 files changed, 268 insertions(+), 6 deletions(-) diff --git a/src/watchmaker/utils/__init__.py b/src/watchmaker/utils/__init__.py index c0e2cfdc5..c8169d5da 100644 --- a/src/watchmaker/utils/__init__.py +++ b/src/watchmaker/utils/__init__.py @@ -4,6 +4,7 @@ unicode_literals, with_statement) import os +import shutil import ssl import backoff @@ -58,3 +59,10 @@ def urlopen_retry(uri): pass return urllib.request.urlopen(uri, **kwargs) + + +def copytree(src, dst, force=False, **kwargs): + """Copy directory tree with option to override.""" + if force and os.path.exists(dst): + shutil.rmtree(dst) + shutil.copytree(src, dst, **kwargs) diff --git a/src/watchmaker/workers/salt.py b/src/watchmaker/workers/salt.py index 5af2ee2a0..1861f852e 100644 --- a/src/watchmaker/workers/salt.py +++ b/src/watchmaker/workers/salt.py @@ -177,7 +177,7 @@ def _prepare_for_install(self): os.makedirs(salt_dir) except OSError: if not os.path.isdir(salt_dir): - msg = ('Unable create directory - {0}'.format(salt_dir)) + msg = ('Unable to create directory - {0}'.format(salt_dir)) self.log.error(msg) raise SystemError(msg) @@ -194,11 +194,11 @@ def _get_formulas_conf(self): formulas_path = os.sep.join((static.__path__[0], 'salt', 'formulas')) for formula in os.listdir(formulas_path): formula_path = os.path.join(self.salt_formula_root, '', formula) - if os.path.exists(formula_path): - shutil.rmtree(formula_path) - shutil.copytree( + watchmaker.utils.copytree( os.sep.join((formulas_path, formula)), - formula_path) + formula_path, + force=True + ) # Obtain & extract any Salt formulas specified in user_formulas. for formula_name, formula_url in self.user_formulas.items(): @@ -254,6 +254,18 @@ def _build_salt_formula(self, extract_dir): filepath=salt_content_file, to_directory=extract_dir ) + else: + local_content = os.sep.join( + (static.__path__[0], 'salt', 'content') + ) + if os.path.exists(local_content): + self.log.info('Using local content from %s', local_content) + for subdir in next(os.walk(local_content))[1]: + watchmaker.utils.copytree( + os.sep.join((local_content, subdir)), + os.sep.join((extract_dir, subdir)), + force=True + ) with codecs.open( os.path.join(self.salt_conf_path, 'minion'), diff --git a/tests/test_saltworker.py b/tests/test_saltworker.py index ce023ce46..5c6ac1bab 100644 --- a/tests/test_saltworker.py +++ b/tests/test_saltworker.py @@ -1,12 +1,21 @@ # -*- coding: utf-8 -*- +# pylint: disable=redefined-outer-name,protected-access """Salt worker main test module.""" from __future__ import (absolute_import, division, print_function, unicode_literals, with_statement) +import os + import pytest +import watchmaker.utils from watchmaker.exceptions import InvalidValue -from watchmaker.workers.salt import SaltBase +from watchmaker.workers.salt import SaltBase, SaltWindows + +try: + from unittest.mock import MagicMock, patch +except ImportError: + from mock import MagicMock, patch @pytest.fixture @@ -53,3 +62,236 @@ def test_valid_environment(saltworker_client): saltworker_client.ent_env = 'dev' saltworker_client.valid_envs = [None, 'dev', 'test', 'prod'] assert saltworker_client.before_install() is None + + +@patch.dict(os.environ, {'systemdrive': 'C:'}) +def test_windows_missing_prepdir(): + """Ensure that error raised when missing prep directory.""" + system_params = {} + salt_config = {} + + system_params['logdir'] = "logdir" + system_params['workingdir'] = "workingdir" + + with pytest.raises(KeyError, match='prepdir'): + SaltWindows(system_params, **salt_config) + + +@patch.dict(os.environ, {'systemdrive': 'C:'}) +def test_windows_missing_logdir(): + """Ensure that error raised when missing log directory.""" + system_params = {} + salt_config = {} + + system_params['prepdir'] = "prepdir" + system_params['workingdir'] = "workingdir" + + with pytest.raises(KeyError, match='logdir'): + SaltWindows(system_params, **salt_config) + + +@patch.dict(os.environ, {'systemdrive': 'C:'}) +def test_windows_missing_workingdir(): + """Ensure that error raised when missing working directory.""" + system_params = {} + salt_config = {} + + system_params['logdir'] = "logdir" + system_params['prepdir'] = "prepdir" + + with pytest.raises(KeyError, match='workingdir'): + SaltWindows(system_params, **salt_config) + + +@patch.dict(os.environ, {'systemdrive': 'C:'}) +def test_windows_defaults(): + """Ensure that default values are populated as expected.""" + system_params = {} + salt_config = {} + + system_params['prepdir'] = "8cbda638-6b60-5628-870b-40fdf8add9f8" + system_params['logdir'] = "21fa57e2-9302-5934-978d-4ae40d5a2a55" + system_params['workingdir'] = "c990ee27-ff12-5d7e-9957-1d27d114c0ff" + + salt_config['installer_url'] = "5de41ea1-902c-5e7c-ae86-89587057c6b3" + salt_config['ash_role'] = "b116b3e1-ee3f-5a83-9dd1-3d01d0d5e343" + + win_salt = SaltWindows(system_params, **salt_config) + + # assertions =================== + assert win_salt.installer_url == salt_config['installer_url'] + assert win_salt.ash_role == salt_config['ash_role'] + assert win_salt.salt_root == os.sep.join(("C:", 'Salt')) + assert win_salt.salt_call == os.sep.join(("C:", 'Salt', 'salt-call.bat')) + assert win_salt.salt_wam_root == os.sep.join(( + system_params['prepdir'], + 'Salt', + )) + assert win_salt.salt_conf_path == os.sep.join(( + system_params['prepdir'], + 'Salt', + 'conf', + )) + assert win_salt.salt_srv == os.sep.join(( + system_params['prepdir'], + 'Salt', + 'srv', + )) + assert win_salt.salt_win_repo == os.sep.join(( + system_params['prepdir'], + 'Salt', + 'srv', + 'winrepo', + )) + assert win_salt.salt_log_dir == system_params['logdir'] + assert win_salt.salt_working_dir == system_params['workingdir'] + assert win_salt.salt_working_dir_prefix == 'Salt-' + + assert win_salt.salt_base_env == os.sep.join(( + win_salt.salt_srv, + 'states' + )) + assert win_salt.salt_formula_root == os.sep.join(( + win_salt.salt_srv, + 'formulas' + )) + assert win_salt.salt_pillar_root == os.sep.join(( + win_salt.salt_srv, + 'pillar' + )) + assert win_salt.salt_conf['file_client'] == 'local' + assert win_salt.salt_conf['hash_type'] == 'sha512' + assert win_salt.salt_conf['pillar_roots'] == {'base': [str(os.sep.join(( + win_salt.salt_srv, + 'pillar' + )))]} + assert win_salt.salt_conf['pillar_merge_lists'] + assert win_salt.salt_conf['conf_dir'] == os.sep.join(( + system_params['prepdir'], + 'Salt', + 'conf', + )) + assert win_salt.salt_conf['winrepo_source_dir'] == 'salt://winrepo' + assert win_salt.salt_conf['winrepo_dir'] == os.sep.join(( + system_params['prepdir'], + 'Salt', + 'srv', + 'winrepo', + 'winrepo', + )) + + +@patch.dict(os.environ, {'systemdrive': 'C:'}) +def test_windows_install(): + """Ensure that install runs as expected.""" + system_params = {} + salt_config = {} + system_params['prepdir'] = "0dcd877d-56cb-50c2-954a-80d1084b2216" + system_params['logdir'] = "647c2a49-baf9-511b-a17a-d6ebf0edd91c" + system_params['workingdir'] = "3d6ab2ef-09ad-59f1-a365-ee5f22c95c79" + + salt_config['installer_url'] = "20c913cf-d825-533e-8649-4ab2fed5d9c1" + salt_config['ash_role'] = "f1d27775-9a3d-5e87-ab42-a79ac329ae4b" + + saltworker_win = SaltWindows(system_params, **salt_config) + + saltworker_win._prepare_for_install = MagicMock(return_value=None) + saltworker_win._install_package = MagicMock(return_value=None) + saltworker_win.service_stop = MagicMock(return_value=None) + saltworker_win._build_salt_formula = MagicMock(return_value=None) + saltworker_win.service_disable = MagicMock(return_value=True) + saltworker_win._set_grain = MagicMock(return_value=None) + saltworker_win.process_grains = MagicMock(return_value=None) + saltworker_win.run_salt = MagicMock(return_value=None) + saltworker_win.working_dir = system_params['workingdir'] + saltworker_win.cleanup = MagicMock(return_value=None) + + saltworker_win.install() + + # assertions =================== + assert saltworker_win._prepare_for_install.call_count == 1 + assert saltworker_win._install_package.call_count == 1 + saltworker_win.service_stop.assert_called_with('salt-minion') + saltworker_win._build_salt_formula.assert_called_with( + saltworker_win.salt_srv + ) + saltworker_win.service_disable.assert_called_with('salt-minion') + saltworker_win._set_grain.assert_called_with( + 'ash-windows', {'lookup': {'role': salt_config['ash_role']}} + ) + assert saltworker_win.process_grains.call_count == 1 + saltworker_win.run_salt.assert_called_with('pkg.refresh_db') + assert saltworker_win.cleanup.call_count == 1 + + +@patch.dict(os.environ, {'systemdrive': 'C:'}) +@patch('codecs.open', autospec=True) +@patch('os.makedirs', autospec=True) +@patch('yaml.safe_dump', autospec=True) +def test_windows_prep_install(mock_safe, mock_makedirs, mock_codec): + """Ensure that prep portion of install runs as expected.""" + system_params = {} + salt_config = {} + system_params['prepdir'] = "ac2bf0c3-7985-569f-bfbd-3a8d8a13ce7d" + system_params['logdir'] = "5b0976f8-fcbc-50af-9459-8060589e70d9" + system_params['workingdir'] = "860f630a-f85d-5ed2-bd7a-bbdb48a53b2b" + + salt_config['installer_url'] = "5f0c8635-4a10-5802-8145-732052a0b44b" + salt_config['ash_role'] = "fddc3dc3-3684-5924-bf55-bb1dbc4e4c08" + + saltworker_win = SaltWindows(system_params, **salt_config) + + saltworker_win.create_working_dir = MagicMock( + return_value=system_params['workingdir'] + ) + saltworker_win._prepare_for_install() + + # assertions =================== + saltworker_win.create_working_dir.assert_called_with( + system_params['workingdir'], + 'Salt-' + ) + mock_makedirs.assert_called_with(saltworker_win.salt_conf_path) + mock_codec.assert_called_with( + os.path.join(saltworker_win.salt_conf_path, 'minion'), + 'w', + encoding="utf-8" + ) + mock_safe.assert_called_with( + saltworker_win.salt_conf, + mock_codec.return_value.__enter__(), + default_flow_style=False + ) + + +@patch('os.path.exists', autospec=True) +@patch('shutil.rmtree', autospec=True) +@patch('shutil.copytree', autospec=True) +def test_copytree_no_force(mock_copy, mock_rm, mock_exists): + """Test that copytree results in correct calls without force option.""" + random_src = 'aba51e65-afd2-5020-8117-195f75e64258' + random_dst = 'f74d03de-7c1d-596f-83f3-73748f2e238f' + + watchmaker.utils.copytree(random_src, random_dst) + mock_copy.assert_called_with(random_src, random_dst) + assert mock_rm.call_count == 0 + assert mock_exists.call_count == 0 + + watchmaker.utils.copytree(random_src, random_dst, force=False) + mock_copy.assert_called_with(random_src, random_dst) + assert mock_rm.call_count == 0 + assert mock_exists.call_count == 0 + + +@patch('os.path.exists', autospec=True) +@patch('shutil.rmtree', autospec=True) +@patch('shutil.copytree', autospec=True) +def test_copytree_force(mock_copy, mock_rm, mock_exists): + """Test that copytree results in correct calls with force option.""" + random_src = '44b6df59-db6f-57cb-a570-ccd55d782561' + random_dst = '72fe7962-a7af-5f2f-899b-54798bc5e79f' + + watchmaker.utils.copytree(random_src, random_dst, force=True) + mock_copy.assert_called_with(random_src, random_dst) + mock_rm.assert_called_with(random_dst) + mock_exists.assert_called_with(random_dst) From 6dd50d012ecf13c4e0dcd764206a185ffa7c523f Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Fri, 22 Mar 2019 08:25:06 -0400 Subject: [PATCH 20/30] Change to submodules --- .gitmodules | 3 +++ src/watchmaker/static/salt/content | 1 + 2 files changed, 4 insertions(+) create mode 160000 src/watchmaker/static/salt/content diff --git a/.gitmodules b/.gitmodules index 3c46a1ce1..da242f1fd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -43,3 +43,6 @@ [submodule "src/watchmaker/static/salt/formulas/amazon-inspector-formula"] path = src/watchmaker/static/salt/formulas/amazon-inspector-formula url = https://github.com/plus3it/amazon-inspector-formula.git +[submodule "src/watchmaker/static/salt/content"] + path = src/watchmaker/static/salt/content + url = https://github.com/plus3it/watchmaker-salt-content.git diff --git a/src/watchmaker/static/salt/content b/src/watchmaker/static/salt/content new file mode 160000 index 000000000..e70b56cd0 --- /dev/null +++ b/src/watchmaker/static/salt/content @@ -0,0 +1 @@ +Subproject commit e70b56cd0600ad74f12ef75fe64e8188c2b9d848 From 65b340c7ae94b87801302585438a3ba7cea90ab3 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Fri, 5 Apr 2019 18:40:54 -0400 Subject: [PATCH 21/30] Fill in user content with default --- src/watchmaker/utils/__init__.py | 24 +++++++++++++++++++++++- src/watchmaker/workers/salt.py | 32 +++++++++++++++++++------------- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/src/watchmaker/utils/__init__.py b/src/watchmaker/utils/__init__.py index c8169d5da..300b44493 100644 --- a/src/watchmaker/utils/__init__.py +++ b/src/watchmaker/utils/__init__.py @@ -62,7 +62,29 @@ def urlopen_retry(uri): def copytree(src, dst, force=False, **kwargs): - """Copy directory tree with option to override.""" + r""" + Copy OS directory trees from source to destination. + + Args: + src: (:obj:`str`) + Source directory tree to be copied. + (*Default*: None) + + dst: (:obj:`str`) + Destination where directory tree is to be copied. + (*Default*: None) + + force: (:obj:`bool`) + Whether to delete destination prior to copy. + (*Default*: ``False``) + + Returns: + :obj:`bool`: + ``True`` if the copy was attempted. ``False`` if not. + + """ if force and os.path.exists(dst): shutil.rmtree(dst) + shutil.copytree(src, dst, **kwargs) + return True diff --git a/src/watchmaker/workers/salt.py b/src/watchmaker/workers/salt.py index 1861f852e..d134f9542 100644 --- a/src/watchmaker/workers/salt.py +++ b/src/watchmaker/workers/salt.py @@ -169,7 +169,6 @@ def _prepare_for_install(self): ] for salt_dir in [ - self.salt_base_env, self.salt_formula_root, self.salt_conf_path ]: @@ -241,7 +240,11 @@ def _get_formulas_conf(self): ] def _build_salt_formula(self, extract_dir): + force_copy_bundled_content = True + if self.salt_content and self.salt_content != 'None': + force_copy_bundled_content = False + salt_content_filename = watchmaker.utils.basename_from_uri( self.salt_content ) @@ -254,18 +257,21 @@ def _build_salt_formula(self, extract_dir): filepath=salt_content_file, to_directory=extract_dir ) - else: - local_content = os.sep.join( - (static.__path__[0], 'salt', 'content') - ) - if os.path.exists(local_content): - self.log.info('Using local content from %s', local_content) - for subdir in next(os.walk(local_content))[1]: - watchmaker.utils.copytree( - os.sep.join((local_content, subdir)), - os.sep.join((extract_dir, subdir)), - force=True - ) + + bundled_content = os.sep.join( + (static.__path__[0], 'salt', 'content') + ) + for subdir in next(os.walk(bundled_content))[1]: + if not subdir.startswith('.'): + watchmaker.utils.copytree( + os.sep.join((bundled_content, subdir)), + os.sep.join((extract_dir, subdir)), + force=force_copy_bundled_content + ) + self.log.info( + 'Using bundled content from %s', + os.sep.join((bundled_content, subdir)) + ) with codecs.open( os.path.join(self.salt_conf_path, 'minion'), From 826a48e7d1f5e65ecd18de5f7e9abf6b7f958431 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 7 May 2019 21:34:41 +0000 Subject: [PATCH 22/30] Bump mock from 3.0.4 to 3.0.5 Bumps [mock](https://github.com/testing-cabal/mock) from 3.0.4 to 3.0.5. - [Release notes](https://github.com/testing-cabal/mock/releases) - [Changelog](https://github.com/testing-cabal/mock/blob/master/CHANGELOG.rst) - [Commits](https://github.com/testing-cabal/mock/compare/3.0.4...3.0.5) Signed-off-by: dependabot[bot] --- requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/test.txt b/requirements/test.txt index dee7602bf..1ce819126 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,5 @@ mock==2.0.0;python_version=="2.6" # pyup: ==2.0.0 -mock==3.0.4;python_version>="2.7" +mock==3.0.5;python_version>="2.7" pytest==3.2.5;python_version=="2.6" or python_version=="3.3" # pyup: ==3.2.5 pytest==4.4.1;python_version=="2.7" or python_version>="3.4" pytest-travis-fold==1.3.0 From 0973b89e9e7e4197639a9fd45a09e47adc6e7507 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 8 May 2019 17:58:47 +0000 Subject: [PATCH 23/30] Bump pygments from 2.3.1 to 2.4.0 Bumps [pygments](https://bitbucket.org/birkenfeld/pygments-main) from 2.3.1 to 2.4.0. - [Changelog](https://bitbucket.org/birkenfeld/pygments-main/src/default/CHANGES) - [Commits](https://bitbucket.org/birkenfeld/pygments-main/commits) Signed-off-by: dependabot[bot] --- requirements/check.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/check.txt b/requirements/check.txt index f5f0b94a9..87c087aa4 100644 --- a/requirements/check.txt +++ b/requirements/check.txt @@ -10,6 +10,6 @@ isort==4.3.18 m2r==0.2.1 pep8-naming==0.8.2 pydocstyle==3.0.0 -pygments==2.3.1 +pygments==2.4.0 pylint==2.3.1 readme-renderer==24.0 From 4f35ca9dbcfb5bf8ba982c0aa5d3b44ca2106331 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 8 May 2019 14:11:32 -0400 Subject: [PATCH 24/30] Fix minor review issues --- src/watchmaker/utils/__init__.py | 6 ----- src/watchmaker/workers/salt.py | 12 ++++----- tests/test_saltworker.py | 34 ------------------------ tests/test_utils.py | 45 ++++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 47 deletions(-) create mode 100644 tests/test_utils.py diff --git a/src/watchmaker/utils/__init__.py b/src/watchmaker/utils/__init__.py index 300b44493..e072b9409 100644 --- a/src/watchmaker/utils/__init__.py +++ b/src/watchmaker/utils/__init__.py @@ -77,14 +77,8 @@ def copytree(src, dst, force=False, **kwargs): force: (:obj:`bool`) Whether to delete destination prior to copy. (*Default*: ``False``) - - Returns: - :obj:`bool`: - ``True`` if the copy was attempted. ``False`` if not. - """ if force and os.path.exists(dst): shutil.rmtree(dst) shutil.copytree(src, dst, **kwargs) - return True diff --git a/src/watchmaker/workers/salt.py b/src/watchmaker/workers/salt.py index d134f9542..a80fbdb1d 100644 --- a/src/watchmaker/workers/salt.py +++ b/src/watchmaker/workers/salt.py @@ -240,11 +240,7 @@ def _get_formulas_conf(self): ] def _build_salt_formula(self, extract_dir): - force_copy_bundled_content = True - if self.salt_content and self.salt_content != 'None': - force_copy_bundled_content = False - salt_content_filename = watchmaker.utils.basename_from_uri( self.salt_content ) @@ -262,11 +258,13 @@ def _build_salt_formula(self, extract_dir): (static.__path__[0], 'salt', 'content') ) for subdir in next(os.walk(bundled_content))[1]: - if not subdir.startswith('.'): + if ( + not subdir.startswith('.') and + not os.path.exists(os.sep.join((extract_dir, subdir))) + ): watchmaker.utils.copytree( os.sep.join((bundled_content, subdir)), - os.sep.join((extract_dir, subdir)), - force=force_copy_bundled_content + os.sep.join((extract_dir, subdir)) ) self.log.info( 'Using bundled content from %s', diff --git a/tests/test_saltworker.py b/tests/test_saltworker.py index 5c6ac1bab..20164d662 100644 --- a/tests/test_saltworker.py +++ b/tests/test_saltworker.py @@ -8,7 +8,6 @@ import pytest -import watchmaker.utils from watchmaker.exceptions import InvalidValue from watchmaker.workers.salt import SaltBase, SaltWindows @@ -262,36 +261,3 @@ def test_windows_prep_install(mock_safe, mock_makedirs, mock_codec): mock_codec.return_value.__enter__(), default_flow_style=False ) - - -@patch('os.path.exists', autospec=True) -@patch('shutil.rmtree', autospec=True) -@patch('shutil.copytree', autospec=True) -def test_copytree_no_force(mock_copy, mock_rm, mock_exists): - """Test that copytree results in correct calls without force option.""" - random_src = 'aba51e65-afd2-5020-8117-195f75e64258' - random_dst = 'f74d03de-7c1d-596f-83f3-73748f2e238f' - - watchmaker.utils.copytree(random_src, random_dst) - mock_copy.assert_called_with(random_src, random_dst) - assert mock_rm.call_count == 0 - assert mock_exists.call_count == 0 - - watchmaker.utils.copytree(random_src, random_dst, force=False) - mock_copy.assert_called_with(random_src, random_dst) - assert mock_rm.call_count == 0 - assert mock_exists.call_count == 0 - - -@patch('os.path.exists', autospec=True) -@patch('shutil.rmtree', autospec=True) -@patch('shutil.copytree', autospec=True) -def test_copytree_force(mock_copy, mock_rm, mock_exists): - """Test that copytree results in correct calls with force option.""" - random_src = '44b6df59-db6f-57cb-a570-ccd55d782561' - random_dst = '72fe7962-a7af-5f2f-899b-54798bc5e79f' - - watchmaker.utils.copytree(random_src, random_dst, force=True) - mock_copy.assert_called_with(random_src, random_dst) - mock_rm.assert_called_with(random_dst) - mock_exists.assert_called_with(random_dst) diff --git a/tests/test_utils.py b/tests/test_utils.py new file mode 100644 index 000000000..d6aa1bba7 --- /dev/null +++ b/tests/test_utils.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# pylint: disable=redefined-outer-name,protected-access +"""Salt worker main test module.""" +from __future__ import (absolute_import, division, print_function, + unicode_literals, with_statement) + +import watchmaker.utils + +try: + from unittest.mock import patch +except ImportError: + from mock import patch + + +@patch('os.path.exists', autospec=True) +@patch('shutil.rmtree', autospec=True) +@patch('shutil.copytree', autospec=True) +def test_copytree_no_force(mock_copy, mock_rm, mock_exists): + """Test that copytree results in correct calls without force option.""" + random_src = 'aba51e65-afd2-5020-8117-195f75e64258' + random_dst = 'f74d03de-7c1d-596f-83f3-73748f2e238f' + + watchmaker.utils.copytree(random_src, random_dst) + mock_copy.assert_called_with(random_src, random_dst) + assert mock_rm.call_count == 0 + assert mock_exists.call_count == 0 + + watchmaker.utils.copytree(random_src, random_dst, force=False) + mock_copy.assert_called_with(random_src, random_dst) + assert mock_rm.call_count == 0 + assert mock_exists.call_count == 0 + + +@patch('os.path.exists', autospec=True) +@patch('shutil.rmtree', autospec=True) +@patch('shutil.copytree', autospec=True) +def test_copytree_force(mock_copy, mock_rm, mock_exists): + """Test that copytree results in correct calls with force option.""" + random_src = '44b6df59-db6f-57cb-a570-ccd55d782561' + random_dst = '72fe7962-a7af-5f2f-899b-54798bc5e79f' + + watchmaker.utils.copytree(random_src, random_dst, force=True) + mock_copy.assert_called_with(random_src, random_dst) + mock_rm.assert_called_with(random_dst) + mock_exists.assert_called_with(random_dst) From 9b33551089b7399819bda9e9a8e301274598a3ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 8 May 2019 21:18:30 +0000 Subject: [PATCH 25/30] Bump pytest from 4.4.1 to 4.4.2 Bumps [pytest](https://github.com/pytest-dev/pytest) from 4.4.1 to 4.4.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/4.4.1...4.4.2) Signed-off-by: dependabot[bot] --- requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/test.txt b/requirements/test.txt index 1ce819126..dfa17d73c 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,7 +1,7 @@ mock==2.0.0;python_version=="2.6" # pyup: ==2.0.0 mock==3.0.5;python_version>="2.7" pytest==3.2.5;python_version=="2.6" or python_version=="3.3" # pyup: ==3.2.5 -pytest==4.4.1;python_version=="2.7" or python_version>="3.4" +pytest==4.4.2;python_version=="2.7" or python_version>="3.4" pytest-travis-fold==1.3.0 pytest-catchlog==1.2.2;python_version=="2.6" pytest-cov==2.5.1;python_version=="2.6" # pyup: ==2.5.1 From 860f00264e44325fb75793e79af3c50b0a2571f9 Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Thu, 9 May 2019 11:29:18 -0400 Subject: [PATCH 26/30] Updates gitlab-ci to use python36 and ensurepip --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2fd2e6ad4..b195d05e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,9 @@ image: ${IMAGE} before_script: - - sudo yum -y install python34 python34-pip python34-libs python34-setuptools - - sudo python3 -m pip install --upgrade pip + - sudo yum -y install python36 python36-libs python36-setuptools + - sudo python3.6 -m ensurepip --upgrade + - test -f /usr/bin/pip3 || sudo ln -sf /usr/local/bin/pip3 /usr/bin/pip3 - sudo pip3 install --upgrade -r requirements/docs.txt - sudo pip3 install -e . From 2d218346d21602b4f3d1cdd609530cdf700fb8ac Mon Sep 17 00:00:00 2001 From: Long C Lam <31355535+eemperor@users.noreply.github.com> Date: Fri, 10 May 2019 12:44:22 +0000 Subject: [PATCH 27/30] Adds Python 3.7 tests to CI --- .travis.yml | 3 +++ appveyor.yml | 35 +++++++++++++++++++++++++++++++++++ tox.ini | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d2ba3d3ea..4743747d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,6 +54,9 @@ notifications: on_failure: always jobs: include: + - stage: test + python: 3.7 + dist: xenial - stage: test python: 3.6 env: diff --git a/appveyor.yml b/appveyor.yml index 9381ce258..49b6d4a75 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,6 +14,41 @@ init: install: - git submodule update --init --recursive test_script: + # ----- python 3.7, x64 + # python envs + - set PYTHON_HOME=C:\Python37-x64 + - set PYTHON_VERSION=3.7 + - set PYTHON_ARCH=64 + + # install + - '%PYTHON_HOME%\Scripts\pip install --upgrade tox setuptools virtualenv wheel' + + # versions + - '%PYTHON_HOME%\Scripts\virtualenv --version' + - '%PYTHON_HOME%\Scripts\tox --version' + - '%PYTHON_HOME%\Scripts\pip --version' + + # test + - set TOXENV=3.7-codecov + - '%WITH_ENV% %PYTHON_HOME%\Scripts\tox -v' + + # ----- python 3.7, x32 + # python envs + - set PYTHON_HOME=C:\Python37 + - set PYTHON_ARCH=32 + + # install + - '%PYTHON_HOME%\Scripts\pip install --upgrade tox setuptools virtualenv wheel' + + # versions + - '%PYTHON_HOME%\Scripts\virtualenv --version' + - '%PYTHON_HOME%\Scripts\tox --version' + - '%PYTHON_HOME%\Scripts\pip --version' + + # test + - set TOXENV=3.7-codecov + - '%WITH_ENV% %PYTHON_HOME%\Scripts\tox -v' + # ----- python 3.6, x64 # python envs - set PYTHON_HOME=C:\Python36-x64 diff --git a/tox.ini b/tox.ini index 34f113197..2cb67c89f 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ [tox] envlist = check, - {2.6,2.7,3.4,3.5,3.6,pypy}-codecov, + {2.6,2.7,3.4,3.5,3.6,3.7,pypy}-codecov, report, docs From a7a48c44feda06cb13acb9a4d2b3b137b3913d46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Fri, 10 May 2019 16:12:59 +0000 Subject: [PATCH 28/30] Bump src/watchmaker/static/salt/formulas/join-domain-formula Bumps [src/watchmaker/static/salt/formulas/join-domain-formula](https://github.com/plus3it/join-domain-formula) from `8dbfc8c` to `4cdf8f9`. - [Release notes](https://github.com/plus3it/join-domain-formula/releases) - [Commits](https://github.com/plus3it/join-domain-formula/compare/8dbfc8c8b3b0aecbd8b7bd6033b063343b419674...4cdf8f92047d00faff7b404a69fe75f08de35d4b) Signed-off-by: dependabot[bot] --- src/watchmaker/static/salt/formulas/join-domain-formula | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/watchmaker/static/salt/formulas/join-domain-formula b/src/watchmaker/static/salt/formulas/join-domain-formula index 8dbfc8c8b..4cdf8f920 160000 --- a/src/watchmaker/static/salt/formulas/join-domain-formula +++ b/src/watchmaker/static/salt/formulas/join-domain-formula @@ -1 +1 @@ -Subproject commit 8dbfc8c8b3b0aecbd8b7bd6033b063343b419674 +Subproject commit 4cdf8f92047d00faff7b404a69fe75f08de35d4b From 02fbb0bbf65f6d39d79899fd9b082058e705669a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Fri, 10 May 2019 17:30:35 +0000 Subject: [PATCH 29/30] Bump src/watchmaker/static/salt/formulas/join-domain-formula Bumps [src/watchmaker/static/salt/formulas/join-domain-formula](https://github.com/plus3it/join-domain-formula) from `4cdf8f9` to `a9acd12`. - [Release notes](https://github.com/plus3it/join-domain-formula/releases) - [Commits](https://github.com/plus3it/join-domain-formula/compare/4cdf8f92047d00faff7b404a69fe75f08de35d4b...a9acd1233a96f1904bffb67d504191a7c1252a05) Signed-off-by: dependabot[bot] --- src/watchmaker/static/salt/formulas/join-domain-formula | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/watchmaker/static/salt/formulas/join-domain-formula b/src/watchmaker/static/salt/formulas/join-domain-formula index 4cdf8f920..a9acd1233 160000 --- a/src/watchmaker/static/salt/formulas/join-domain-formula +++ b/src/watchmaker/static/salt/formulas/join-domain-formula @@ -1 +1 @@ -Subproject commit 4cdf8f92047d00faff7b404a69fe75f08de35d4b +Subproject commit a9acd1233a96f1904bffb67d504191a7c1252a05 From 9f82b4d5de4be413a4b39498fd3e0b24182a3e23 Mon Sep 17 00:00:00 2001 From: Long C Lam <31355535+eemperor@users.noreply.github.com> Date: Fri, 10 May 2019 20:48:52 +0000 Subject: [PATCH 30/30] Prepares watchmaker 0.16.0 release --- .bumpversion.cfg | 2 +- CHANGELOG.md | 14 ++++++++++++++ setup.cfg | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 131cbdc3b..9a8f10f3f 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.15.2 +current_version = 0.16.0 commit = False tag = False tag_name = {new_version} diff --git a/CHANGELOG.md b/CHANGELOG.md index cd8f14c11..23e51b6d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ ## Changelog +### 0.16.0 + +**Commit Delta**: [Change from 0.15.2 release](https://github.com/plus3it/watchmaker/compare/0.15.2...0.16.0) + +**Released**: 2019.05.10 + +**Summary**: + +* Adds salt content locally as a submodule to better support Watchmaker standalone packages +* dotnet4-formula + - Updates formula to support the use of Python3 versions of Salt +* join-domain-formula + - Adds additional enhancements and logic to better handle the domin-join process in Linux + ### 0.15.2 **Commit Delta**: [Change from 0.15.1 release](https://github.com/plus3it/watchmaker/compare/0.15.1...0.15.2) diff --git a/setup.cfg b/setup.cfg index bb044a59d..9a9766963 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ [metadata] name = watchmaker description = Applied Configuration Management -version = 0.15.2 +version = 0.16.0 author = Plus3IT Maintainers of Watchmaker author_email = projects@plus3it.com url = https://github.com/plus3it/watchmaker