Skip to content

Commit

Permalink
env var to skip cert verify for dev contexts
Browse files Browse the repository at this point in the history
failed lint
  • Loading branch information
Alix Cook committed Oct 14, 2019
1 parent 37eba1c commit 11a22c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ requests
humanfriendly
party
pluginbase
django
3 changes: 2 additions & 1 deletion src/lavatory/utils/artifactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def __init__(self, repo_name=None):
self.artifactory.artifactory_url = self.api_url
self.artifactory.username = self.credentials['artifactory_username']
self.artifactory.password = base64.encodebytes(bytes(self.credentials['artifactory_password'], 'utf-8'))
self.artifactory.certbundle = os.getenv('LAVATORY_CERTBUNDLE_PATH', certifi.where())
skip_verify = int(os.getenv('LAVATORY_SKIP_CERT_VERIFY', '1'))
self.artifactory.certbundle = False if skip_verify else os.getenv('LAVATORY_CERTBUNDLE_PATH', certifi.where())

def repos(self, repo_type='local'):
"""
Expand Down

0 comments on commit 11a22c9

Please sign in to comment.