-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to setup config through env (#71)
- Loading branch information
Showing
8 changed files
with
169 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ __pycache__ | |
bert_e.egg-info | ||
.tox/ | ||
settings.yml | ||
.coverage | ||
.pytest_cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
frontend_url: https://bert-e.mydomain.com/bitbucket/my_company/my_repository/bert-e/ | ||
|
||
jira_keys: | ||
- MYJIRAPROJECTKEY | ||
|
||
prefixes: | ||
Story: feature | ||
Bug: bugfix | ||
Improvement: improvement | ||
Epic: epic | ||
|
||
bypass_prefixes: | ||
- documentation | ||
- dependabot | ||
|
||
disable_version_checks: true | ||
|
||
pr_author_options: | ||
username: | ||
- bypass_author_approval | ||
- bypass_jira_check | ||
- bypass_build_status | ||
- bypass_incompatible_branch | ||
- bypass_peer_approval | ||
- bypass_leader_approval | ||
|
||
admins: | ||
- username_admin_1 | ||
- username_admin_2@557042:08898ca4-5f12-4042-9942-87e167728afd | ||
|
||
tasks: | ||
- do this | ||
- do that | ||
|
||
max_commit_diff: 100 | ||
|
||
sentry_dsn: '' | ||
|
||
always_create_integration_pull_requests: true | ||
|
||
required_leader_approvals: 1 | ||
|
||
project_leaders: | ||
- username_leader_1 | ||
- username_leader_2@557042:66898ca4-5f12-4042-9942-87e167728afd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
"""Unit tests fixtures.""" | ||
import os | ||
from os.path import abspath | ||
import pytest | ||
|
||
from bert_e.settings import setup_settings | ||
|
||
|
||
@pytest.fixture | ||
def settings(): | ||
"""Simple settings fixture.""" | ||
return setup_settings(os.path.abspath('settings.sample.yml')) | ||
|
||
|
||
@pytest.fixture | ||
def settings_env(): | ||
"""Simple settings fixture.""" | ||
os.environ['BERT_E_REPOSITORY_HOST'] = 'github' | ||
os.environ['BERT_E_REPOSITORY_OWNER'] = 'scality' | ||
os.environ['BERT_E_REPOSITORY_SLUG'] = 'bert-e' | ||
os.environ['BERT_E_ROBOT'] = 'robot_username' | ||
os.environ['BERT_E_ROBOT_EMAIL'] = '[email protected]' | ||
os.environ['BERT_E_BUILD_KEY'] = 'github_actions' | ||
os.environ['BERT_E_REQUIRED_PEER_APPROVALS'] = '2' | ||
os.environ['BERT_E_NEED_AUTHOR_APPROVAL'] = 'true' | ||
os.environ['BERT_E_JIRA_ACCOUNT_URL'] = 'https://my_account.atlassian.net' | ||
os.environ['BERT_E_JIRA_EMAIL'] = '[email protected]' | ||
return setup_settings(abspath('bert_e/tests/assets/settings-env.yml')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,18 +46,6 @@ robot: robot_username | |
robot_email: [email protected] | ||
|
||
|
||
# pull_request_base_url [MANDATORY]: | ||
# The PR base url to link in status page | ||
# | ||
pull_request_base_url: https://bitbucket.org/foo/bar/pull-requests/{pr_id} | ||
|
||
|
||
# commit_base_url [MANDATORY]: | ||
# The commit base url to link in status page | ||
# | ||
commit_base_url: https://bitbucket.org/foo/bar/commits/{commit_id} | ||
|
||
|
||
# build_key [OPTIONAL]: | ||
# The label of the key to look for in githost commit statuses. | ||
# The key "github_actions" can be set to check github actions status instead of external app checks | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters