From dda41ab76466ee497e3cee3dca5571af520c8edb Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 19 Sep 2022 15:04:17 -0700 Subject: [PATCH] github2fedmsg: split out staging from prod credentials Signed-off-by: Kevin Fenzi --- roles/github2fedmsg/templates/github2fedmsg.ini | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/roles/github2fedmsg/templates/github2fedmsg.ini b/roles/github2fedmsg/templates/github2fedmsg.ini index 597061ab02..2df8b26449 100644 --- a/roles/github2fedmsg/templates/github2fedmsg.ini +++ b/roles/github2fedmsg/templates/github2fedmsg.ini @@ -23,7 +23,11 @@ pyramid.default_locale_name = en pyramid.includes = pyramid_tm +{% if env != 'staging' %} sqlalchemy.url = postgresql://{{github2fedmsgDBUser}}:{{github2fedmsgDBPassword}}@db-github2fedmsg/github2fedmsg +{% else %} +sqlalchemy.url = postgresql://{{github2fedmsgStgDBUser}}:{{github2fedmsgStgDBPassword}}@db-github2fedmsg/github2fedmsg +{% endif %} mako.directories=github2fedmsg:templates @@ -36,6 +40,9 @@ velruse.openid.identifier = https://id.fedoraproject.org/ velruse.openid.realm = https://apps.fedoraproject.org/github2fedmsg github.callback = https://apps.fedoraproject.org/github2fedmsg/webhook github.secret = {{github2fedmsgGHSecret}} + +session.secret="{{github2fedmsgSessionSecret}}" +authnsecret="{{github2fedmsgAuthnSecret}}" {% else %} github.secret_oauth_access_token = {{github2fedmsg_gh_secret_oauth_access_token_staging}} velruse.github.consumer_key = {{github2fedmsg_gh_app_key_staging}} @@ -45,10 +52,10 @@ velruse.openid.identifier = https://id.stg.fedoraproject.org/ velruse.openid.realm = https://apps.stg.fedoraproject.org/github2fedmsg github.callback = https://apps.stg.fedoraproject.org/github2fedmsg/webhook github.secret = {{github2fedmsgGHSecret_staging}} -{% endif %} -session.secret="{{github2fedmsgSessionSecret}}" -authnsecret="{{github2fedmsgAuthnSecret}}" +session.secret="{{github2fedmsgStgSessionSecret}}" +authnsecret="{{github2fedmsgStgAuthnSecret}}" +{% endif %} # Begin logging configuration