Skip to content

Commit

Permalink
PTFE-600 fixing imports and settings
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet committed Jul 14, 2023
1 parent c7e0253 commit e82d4a1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ All above instructions will assume you are inside the codespace environment
```shell
$ cp settings.sample.yml settings.yml
# Configure settings.yml to your liking
$ tox -e run
$ tox run -e run
```

### Run local tests
Expand Down
2 changes: 0 additions & 2 deletions bert_e/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
def setup_bert_e(settings_file, debug):
"""Create and configure Bert-E instance."""
settings = setup_settings(settings_file)
settings['robot_password'] = os.environ['BERT_E_GITHOST_PWD']
settings['jira_token'] = os.environ['BERT_E_JIRA_TOKEN']
settings['backtrace'] = True

bert_e = BertE(settings)
Expand Down
2 changes: 1 addition & 1 deletion charts/bert-e/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
heritage: "{{ .Release.Service }}"
type: Opaque
data:
BERT_E_GITHOST_PWD: {{ .Values.bertE.robot.password | b64enc | quote }}
BERT_E_ROBOT_PASSWORD: {{ .Values.bertE.robot.password | b64enc | quote }}
WEBHOOK_LOGIN: {{ .Values.bertE.webhook.username | b64enc | quote }}
WEBHOOK_PWD: {{ .Values.bertE.webhook.password | b64enc | quote }}
BERT_E_JIRA_TOKEN: {{ .Values.bertE.jira.token | b64enc | quote }}
Expand Down
2 changes: 1 addition & 1 deletion manifests/base/secrets.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BERT_E_CLIENT_SECRET=vault:secret/data/bert-e#BERT_E_GITHUB_OAUTH_CLIENT_SECRET
BERT_E_CLIENT_ID=vault:secret/data/bert-e#BERT_E_GITHUB_OAUTH_CLIENT_ID
BERT_E_GITHOST_PWD=vault:secret/data/bert-e#BERT_E_GITHUB_TOKEN
BERT_E_ROBOT_PASSWORD=vault:secret/data/bert-e#BERT_E_GITHUB_TOKEN
BERT_E_GITHUB_TOKEN=vault:secret/data/bert-e#BERT_E_GITHUB_TOKEN
BERT_E_JIRA_TOKEN=vault:secret/data/bert-e#BERT_E_JIRA_TOKEN
BERT_E_JIRA_USER=vault:secret/data/bert-e#BERT_E_JIRA_USERNAME
Expand Down
6 changes: 3 additions & 3 deletions settings.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ frontend_url: https://bert-e.mydomain.com/bitbucket/my_company/my_repository/ber

# repository_host [MANDATORY]:
# The git hosting provider for the repository. Either bitbucket or github.
repository_host: bitbucket
repository_host: github

# repository_owner [MANDATORY]:
# The name of the owner of the Bitbucket/GitHub repository to work on
#
# (a.k.a. Bitbucket team or GitHub organization)
#
repository_owner: my_company
repository_owner: scality


# repository_slug [MANDATORY]:
# The slug of the Bitbucket/GitHub repository to work on
#
repository_slug: my_repository
repository_slug: bert-e


# robot [MANDATORY]:
Expand Down
13 changes: 2 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
import pip

from setuptools import setup
from setuptools import setup, find_packages


# Besides not advised,
Expand Down Expand Up @@ -44,16 +44,7 @@ def requires():
url='https://github.com/scality/bert-e',
license='Apache',
include_package_data=True,
packages=[
'bert_e',
'bert_e.jobs',
'bert_e.lib',
'bert_e.bin',
'bert_e.git_host',
'bert_e.git_host.github',
'bert_e.workflow',
'bert_e.workflow.gitwaterflow',
],
packages=find_packages(),
install_requires=requires(),
entry_points={
'console_scripts': [
Expand Down
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ commands =
coverage html

[testenv:run]
passenv = BERT_E_* WEBHOOK_*
passenv =
BERT_E_*
WEBHOOK_*
setenv =
BERT_E_CLIENT_SECRET = {env:BERT_E_CLIENT_SECRET:'bert_e_client_secret'}
BERT_E_CLIENT_ID = {env:BERT_E_CLIENT_ID:'bert_e_client_id'}
BERT_E_GITHOST_PWD = {env:GITHUB_TOKEN}
BERT_E_ROBOT_PASSWORD = {env:GITHUB_TOKEN}
BERT_E_JIRA_TOKEN = {env:BERT_E_JIRA_TOKEN:'jira_token'}
WEBHOOK_LOGIN = {env:WEBHOOK_LOGIN:'webhook'}
WEBHOOK_PWD = {env:WEBHOOK_PWD:'webhook'}
Expand Down

0 comments on commit e82d4a1

Please sign in to comment.