Skip to content

Commit

Permalink
Merge branch 'release/0.29.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
lasote committed Jul 9, 2019
2 parents c7b7b81 + dc15187 commit 2b5a969
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
4 changes: 2 additions & 2 deletions cpt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

__version__ = '0.28.1'
NEWEST_CONAN_SUPPORTED = "1.17.0-dev"
__version__ = '0.29.0'
NEWEST_CONAN_SUPPORTED = "1.18.0-dev"


def get_client_version():
Expand Down
2 changes: 1 addition & 1 deletion cpt/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def __init__(self, username=None, channel=None, runner=None,

self.upload_only_recipe = upload_only_recipe or get_bool_from_env("CONAN_UPLOAD_ONLY_RECIPE")

self.remotes_manager.add_remotes_to_conan()
self.uploader = Uploader(self.conan_api, self.remotes_manager, self.auth_manager,
self.printer, self.upload_retry)

Expand Down Expand Up @@ -475,7 +476,6 @@ def run(self, base_profile_name=None):
self.printer.print_message("Skipped builds due [skip ci] commit message")
return 99
if not self.skip_check_credentials and self._upload_enabled():
self.remotes_manager.add_remotes_to_conan()
self.auth_manager.login(self.remotes_manager.upload_remote_name)
if self.conan_pip_package and not self.use_docker:
with self.printer.foldable_output("pip_update"):
Expand Down
2 changes: 1 addition & 1 deletion cpt/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
six>=1.10.0
conan>=1.7.0, <1.17.0
conan>=1.7.0, <1.18.0
tabulate==0.8.2
1 change: 1 addition & 0 deletions cpt/run_in_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def run():
printer = Printer()

remotes_manager = RemotesManager(conan_api, printer)
remotes_manager.add_remotes_to_conan()
default_username = os.getenv("CONAN_USERNAME")
auth_manager = AuthManager(conan_api, printer, default_username=default_username)

Expand Down
1 change: 0 additions & 1 deletion cpt/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def __init__(self, profile_abs_path, reference, conan_api, uploader,
self._exclude_vcvars_precommand = exclude_vcvars_precommand
self._build_policy = build_policy
self._runner = PrintRunner(runner or os.system, self.printer)
self._uploader.remote_manager.add_remotes_to_conan()
self._test_folder = test_folder
self._config_url = config_url
self._upload_only_recipe = upload_only_recipe
Expand Down
10 changes: 2 additions & 8 deletions cpt/test/unit/packager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,6 @@ def test_remotes(self):
reference="lib/1.0@lasote/mychannel",
ci_manager=self.ci_manager)

builder.add({}, {}, {}, {})
builder.run_builds()
self.assertEquals(self.conan_api.calls[1].args[1], "url1")
self.assertEquals(self.conan_api.calls[1].kwargs["insert"], -1)
self.assertEquals(self.conan_api.calls[3].args[1], "url2")
Expand All @@ -485,8 +483,6 @@ def test_remotes(self):
reference="lib/1.0@lasote/mychannel",
ci_manager=self.ci_manager)

builder.add({}, {}, {}, {})
builder.run_builds()
self.assertEquals(self.conan_api.calls[1].args[1], "myurl1")
self.assertEquals(self.conan_api.calls[1].kwargs["insert"], -1)

Expand All @@ -502,8 +498,6 @@ def test_remotes(self):
reference="lib/1.0@lasote/mychannel",
ci_manager=self.ci_manager)

builder.add({}, {}, {}, {})
builder.run_builds()
self.assertEquals(self.conan_api.calls[1].args[0], "my_cool_name1")
self.assertEquals(self.conan_api.calls[1].args[1], "u1")
self.assertEquals(self.conan_api.calls[1].kwargs["insert"], -1)
Expand Down Expand Up @@ -710,7 +704,7 @@ def test_check_credentials(self):

# When activated, check credentials before to create the profiles
self.assertEqual(self.conan_api.calls[2].name, 'authenticate')
self.assertEqual(self.conan_api.calls[5].name, 'create_profile')
self.assertEqual(self.conan_api.calls[3].name, 'create_profile')

self.conan_api = MockConanAPI()
# If we skip the credentials check, the login will be performed just before the upload
Expand All @@ -725,7 +719,7 @@ def test_check_credentials(self):
ci_manager=self.ci_manager)
builder.add_common_builds()
builder.run()
self.assertNotEqual(self.conan_api.calls[0].name, 'authenticate')
self.assertNotEqual(self.conan_api.calls[2].name, 'authenticate')

# No upload, no authenticate
self.conan_api = MockConanAPI()
Expand Down

0 comments on commit 2b5a969

Please sign in to comment.