ci: Get APP_API_TOKENS from env (#7271)

* ci: Get APP_API_TOKENS from env

* ci: chart fixup

* ci: Remove canned APP_API_TOKENs

(setec astronomy)
This commit is contained in:
Jennifer Richards 2024-04-02 11:02:45 -03:00 committed by Nicolas Giard
parent 253ba1dfbd
commit 8872e31e30
2 changed files with 9 additions and 5 deletions

View file

@ -3,6 +3,7 @@
from base64 import b64decode from base64 import b64decode
from email.utils import parseaddr from email.utils import parseaddr
import json
from ietf import __release_hash__ from ietf import __release_hash__
from ietf.settings import * # pyflakes:ignore from ietf.settings import * # pyflakes:ignore
@ -136,11 +137,11 @@ elif SERVER_MODE == "production":
"DATATRACKER_MEETECHO_CLIENT_ID and DATATRACKER_MEETECHO_CLIENT_SECRET must be set in production" "DATATRACKER_MEETECHO_CLIENT_ID and DATATRACKER_MEETECHO_CLIENT_SECRET must be set in production"
) )
APP_API_TOKENS = { _APP_API_TOKENS_JSON = os.environ.get("DATATRACKER_APP_API_TOKENS_JSON", None)
"ietf.api.views.directauth": ["redacted",], if _APP_API_TOKENS_JSON is not None:
"ietf.api.views.email_aliases": ["redacted"], APP_API_TOKENS = json.loads(_APP_API_TOKENS_JSON)
"ietf.api.views.active_email_list": ["redacted"], else:
} APP_API_TOKENS = {}
EMAIL_COPY_TO = "" EMAIL_COPY_TO = ""
@ -195,6 +196,8 @@ DE_GFM_BINARY = "/usr/local/bin/de-gfm"
IDSUBMIT_IDNITS_BINARY = "/usr/local/bin/idnits" IDSUBMIT_IDNITS_BINARY = "/usr/local/bin/idnits"
# Duplicating production cache from settings.py and using it whether we're in production mode or not # Duplicating production cache from settings.py and using it whether we're in production mode or not
MEMCACHED_HOST = os.environ.get("MEMCACHED_SERVICE_HOST", "127.0.0.1")
MEMCACHED_PORT = os.environ.get("MEMCACHED_SERVICE_PORT", "11211")
from ietf import __version__ from ietf import __version__
CACHES = { CACHES = {
"default": { "default": {

View file

@ -593,3 +593,4 @@ env:
# DATATRACKER_MATOMO_SITE_ID: "7" # must be present to enable Matomo # DATATRACKER_MATOMO_SITE_ID: "7" # must be present to enable Matomo
# DATATRACKER_MATOMO_DOMAIN_PATH: "analytics.ietf.org" # DATATRACKER_MATOMO_DOMAIN_PATH: "analytics.ietf.org"
CELERY_PASSWORD: "this-is-a-secret" CELERY_PASSWORD: "this-is-a-secret"
# DATATRACKER_APP_API_TOKENS_JSON: "<JSON blob>"