mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-02 20:59:06 +08:00
45 lines
1.7 KiB
Python
45 lines
1.7 KiB
Python
import os
|
|
|
|
config = {
|
|
# Just for dev.
|
|
"validate_signatures": False,
|
|
# Talk to the relay, so things also make it to composer.stg in our dev env
|
|
"active": True,
|
|
# Since we're in active mode, we don't need to declare any of our own
|
|
# passive endpoints. This placeholder value needs to be here for the tests
|
|
# to pass in Jenkins, though. \o/
|
|
"endpoints": {
|
|
"fedora-infrastructure": [
|
|
# Just listen to staging for now, not to production (spam!)
|
|
# "tcp://hub.fedoraproject.org:9940",
|
|
"tcp://stg.fedoraproject.org:9940"
|
|
]
|
|
},
|
|
# Start of code signing configuration
|
|
# 'sign_messages': True,
|
|
# 'validate_signatures': True,
|
|
# 'crypto_backend': 'x509',
|
|
# 'crypto_validate_backends': ['x509'],
|
|
# 'ssldir': '/opt/module_build_service/pki',
|
|
# 'crl_location': 'http://localhost/crl/ca.crl',
|
|
# 'crl_cache': '/etc/pki/fedmsg/crl.pem',
|
|
# 'crl_cache_expiry': 10,
|
|
# 'ca_cert_location': 'http://localhost/crl/ca.crt',
|
|
# 'ca_cert_cache': '/etc/pki/fedmsg/ca.crt',
|
|
# 'ca_cert_cache_expiry': 0, # Never expires
|
|
# 'certnames': {
|
|
# 'module_build_service.localhost': 'localhost'
|
|
# }
|
|
# End of code signing configuration
|
|
}
|
|
|
|
# developer's instance
|
|
true_options = ("1", "on", "true", "y", "yes")
|
|
if os.environ.get("MODULE_BUILD_SERVICE_DEVELOPER_ENV", "").lower() in true_options:
|
|
config["endpoints"]["relay_outbound"] = ["tcp://fedmsg-relay:2001"]
|
|
config["relay_inbound"] = ["tcp://fedmsg-relay:2003"]
|
|
else:
|
|
# These configuration values are reasonable for most other configurations.
|
|
config["endpoints"]["relay_outbound"] = ["tcp://127.0.0.1:4001"]
|
|
config["relay_inbound"] = ["tcp://127.0.0.1:2003"]
|