@@ -55,11 +55,57 @@ config :front,
55
55
cache_pool_size: elem ( Integer . parse ( System . get_env ( "CACHE_POOL_SIZE" ) || "5" ) , 0 ) ,
56
56
github_app_url: System . get_env ( "GITHUB_APPLICATION_URL" ) ,
57
57
cookie_name: System . get_env ( "COOKIE_NAME" ) ,
58
- branch_api_grpc_endpoint: System . get_env ( "BRANCH_GRPC_URL" ) || "127.0.0.1:50052" ,
59
58
use_rbac_api: if ( System . get_env ( "USE_RBAC_API" ) == "true" , do: true , else: false )
60
59
61
60
on_prem? = if ( System . get_env ( "ON_PREM" ) == "true" , do: true , else: false )
62
61
62
+ # Internal API endpoints - always read from environment variables for all environments
63
+ # Test environment will need these env vars set, or use stubs in test setup
64
+ config :front ,
65
+ artifacthub_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_ARTIFACTHUB" ) ,
66
+ audit_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_AUDIT" ) ,
67
+ authentication_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_AUTHENTICATION" ) ,
68
+ billing_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_BILLING" ) ,
69
+ branch_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_BRANCH" ) ,
70
+ dashboard_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_DASHBOARDHUB" ) ,
71
+ feature_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_FEATURE" ) ,
72
+ guard_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_GUARD" ) ,
73
+ guard_user_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_USER" ) ,
74
+ hooks_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_HOOKS" ) ,
75
+ instance_config_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_INSTANCE_CONFIG" ) ,
76
+ job_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_JOB" ) ,
77
+ loghub2_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_LOGHUB2" ) ,
78
+ notification_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_NOTIFICATION" ) ,
79
+ okta_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_OKTA" ) ,
80
+ organization_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_ORGANIZATION" ) ,
81
+ periodic_scheduler_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_SCHEDULER" ) ,
82
+ pipeline_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_PLUMBER" ) ,
83
+ ppl_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_PLUMBER" ) ,
84
+ pre_flight_checks_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_PFC" ) ,
85
+ projecthub_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_PROJECT" ) ,
86
+ rbac_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_RBAC" ) ,
87
+ repo_proxy_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_REPO_PROXY" ) ,
88
+ repohub_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_REPOHUB" ) ,
89
+ repository_integrator_grpc_endpoint:
90
+ System . fetch_env! ( "INTERNAL_API_URL_REPOSITORY_INTEGRATOR" ) ,
91
+ repositoryhub_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_REPOSITORY" ) ,
92
+ scouter_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_SCOUTER" ) ,
93
+ # sobelow_skip ["Config.Secrets"]
94
+ secrets_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_SECRETHUB" ) ,
95
+ self_hosted_agents_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_SELFHOSTEDHUB" ) ,
96
+ superjerry_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_SUPERJERRY" ) ,
97
+ task_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_TASK" ) ,
98
+ velocity_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_VELOCITY" ) ,
99
+ workflow_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_PLUMBER" ) ,
100
+ jwt_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_SECRETHUB" ) ,
101
+ permission_patrol_grpc_endpoint: "127.0.0.1:50052"
102
+
103
+ config :front ,
104
+ license_grpc_endpoint: System . get_env ( "INTERNAL_API_URL_LICENSE_CHECKER" ) ,
105
+ gofer_grpc_endpoint: System . get_env ( "INTERNAL_API_URL_GOFER" ) ,
106
+ groups_grpc_endpoint: System . get_env ( "INTERNAL_API_URL_GROUPS" ) ,
107
+ loghub_api_grpc_endpoint: System . get_env ( "INTERNAL_API_URL_LOGHUB" )
108
+
63
109
if config_env ( ) == :prod do
64
110
config :logger , level: ( System . get_env ( "LOG_LEVEL" ) || "info" ) |> String . to_atom ( )
65
111
config :front , docs_domain: System . get_env ( "DOCS_DOMAIN" , "docs.semaphoreci.com" )
@@ -75,51 +121,6 @@ if config_env() == :prod do
75
121
config :front ,
76
122
support_app_id: System . get_env ( "HELPSCOUT_APP_ID" ) ,
77
123
support_app_secret: System . get_env ( "HELPSCOUT_APP_SECRET" )
78
-
79
- config :front ,
80
- artifacthub_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_ARTIFACTHUB" ) ,
81
- audit_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_AUDIT" ) ,
82
- authentication_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_AUTHENTICATION" ) ,
83
- billing_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_BILLING" ) ,
84
- branch_api_grpc_endpoint: System . get_env ( "INTERNAL_API_URL_BRANCH" ) ,
85
- dashboard_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_DASHBOARDHUB" ) ,
86
- feature_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_FEATURE" ) ,
87
- guard_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_GUARD" ) ,
88
- guard_user_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_USER" ) ,
89
- hooks_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_HOOKS" ) ,
90
- instance_config_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_INSTANCE_CONFIG" ) ,
91
- job_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_JOB" ) ,
92
- loghub2_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_LOGHUB2" ) ,
93
- notification_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_NOTIFICATION" ) ,
94
- okta_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_OKTA" ) ,
95
- organization_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_ORGANIZATION" ) ,
96
- periodic_scheduler_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_SCHEDULER" ) ,
97
- permission_patrol_grpc_endpoint: "127.0.0.1:50052" ,
98
- pipeline_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_PLUMBER" ) ,
99
- ppl_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_PLUMBER" ) ,
100
- pre_flight_checks_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_PFC" ) ,
101
- projecthub_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_PROJECT" ) ,
102
- rbac_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_RBAC" ) ,
103
- repo_proxy_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_REPO_PROXY" ) ,
104
- repohub_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_REPOHUB" ) ,
105
- repository_integrator_grpc_endpoint:
106
- System . fetch_env! ( "INTERNAL_API_URL_REPOSITORY_INTEGRATOR" ) ,
107
- repositoryhub_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_REPOSITORY" ) ,
108
- scouter_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_SCOUTER" ) ,
109
- # sobelow_skip ["Config.Secrets"]
110
- secrets_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_SECRETHUB" ) ,
111
- self_hosted_agents_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_SELFHOSTEDHUB" ) ,
112
- superjerry_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_SUPERJERRY" ) ,
113
- task_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_TASK" ) ,
114
- velocity_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_VELOCITY" ) ,
115
- workflow_api_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_PLUMBER" ) ,
116
- jwt_grpc_endpoint: System . fetch_env! ( "INTERNAL_API_URL_SECRETHUB" ) ,
117
- license_grpc_endpoint: System . get_env ( "INTERNAL_API_URL_LICENSE" , "license-checker:50051" )
118
-
119
- config :front ,
120
- gofer_grpc_endpoint: System . get_env ( "INTERNAL_API_URL_GOFER" ) ,
121
- groups_grpc_endpoint: System . get_env ( "INTERNAL_API_URL_GROUPS" ) ,
122
- loghub_api_grpc_endpoint: System . get_env ( "INTERNAL_API_URL_LOGHUB" )
123
124
end
124
125
125
126
config :front ,
0 commit comments