Пример #1
0
 def _build_artifactory_repos(self, names):
     for name in names:
         logger.info('Building Artifactory instance \"{0}\"'.format(name))
         auth = (self._config.get(name, "user"),
                 self._config.get(name, "password"))
         repos = [
             x.strip() for x in self._config.get(name, "repos").split(',')
         ]
         provider = Artifactory(self._config.get(name, "baseurl"), repos,
                                auth, self._config.get(name, "verify"))
         provider.name = name
         self._artifactory_instances[name] = provider
def create(mock_do_request):
    mock_do_request.return_value = MockResponse(200, "Ok")
    config = Config(configfilepath)
    arti = Artifactory(baseurl=config.get("artifactory", "baseurl"),
                       repos=['R-3.1.2', 'R-local'],
                       auth=(config.get("artifactory", "user"),
                             config.get("artifactory", "password")),
                       verify=config.get("artifactory", "verify"))
    return arti