Make Drone CI configurable
This commit is contained in:
parent
eee81d0cf1
commit
a038a857d9
@ -22,6 +22,8 @@ WEBHOOKS_ALLOWED_IPS='10.1.1.163'
|
|||||||
DISCOURSE_PUBLIC_URL='https://community.kosmos.org'
|
DISCOURSE_PUBLIC_URL='https://community.kosmos.org'
|
||||||
DISCOURSE_CONNECT_SECRET='discourse_connect_ftw'
|
DISCOURSE_CONNECT_SECRET='discourse_connect_ftw'
|
||||||
|
|
||||||
|
DRONECI_PUBLIC_URL='https://drone.kosmos.org'
|
||||||
|
|
||||||
GITEA_PUBLIC_URL='https://gitea.kosmos.org'
|
GITEA_PUBLIC_URL='https://gitea.kosmos.org'
|
||||||
MASTODON_PUBLIC_URL='https://kosmos.social'
|
MASTODON_PUBLIC_URL='https://kosmos.social'
|
||||||
MEDIAWIKI_PUBLIC_URL='https://wiki.kosmos.org'
|
MEDIAWIKI_PUBLIC_URL='https://wiki.kosmos.org'
|
||||||
|
@ -51,6 +51,16 @@ class Setting < RailsSettings::Base
|
|||||||
field :discourse_connect_secret, type: :string,
|
field :discourse_connect_secret, type: :string,
|
||||||
default: ENV["DISCOURSE_CONNECT_SECRET"].presence
|
default: ENV["DISCOURSE_CONNECT_SECRET"].presence
|
||||||
|
|
||||||
|
#
|
||||||
|
# Drone CI
|
||||||
|
#
|
||||||
|
|
||||||
|
field :droneci_public_url, type: :string,
|
||||||
|
default: ENV["DRONECI_PUBLIC_URL"].presence
|
||||||
|
|
||||||
|
field :droneci_enabled, type: :boolean,
|
||||||
|
default: (ENV["DRONECI_PUBLIC_URL"].present?.to_s || false)
|
||||||
|
|
||||||
#
|
#
|
||||||
# ejabberd
|
# ejabberd
|
||||||
#
|
#
|
||||||
|
16
app/views/admin/settings/services/_droneci.html.erb
Normal file
16
app/views/admin/settings/services/_droneci.html.erb
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<h3>Drone CI</h3>
|
||||||
|
<ul role="list">
|
||||||
|
<%= render FormElements::FieldsetToggleComponent.new(
|
||||||
|
form: f,
|
||||||
|
attribute: :droneci_enabled,
|
||||||
|
enabled: Setting.droneci_enabled?,
|
||||||
|
title: "Enable Drone CI integration",
|
||||||
|
description: "Drone CI configuration present and features enabled"
|
||||||
|
) %>
|
||||||
|
<% if Setting.droneci_enabled? %>
|
||||||
|
<%= render FormElements::FieldsetResettableSettingComponent.new(
|
||||||
|
key: :droneci_public_url,
|
||||||
|
title: "Public URL"
|
||||||
|
) %>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
@ -5,6 +5,13 @@
|
|||||||
icon: Setting.discourse_enabled? ? "check" : "x",
|
icon: Setting.discourse_enabled? ? "check" : "x",
|
||||||
active: current_page?(admin_settings_services_path(params: { s: "discourse" })),
|
active: current_page?(admin_settings_services_path(params: { s: "discourse" })),
|
||||||
) %>
|
) %>
|
||||||
|
<%= render SidenavLinkComponent.new(
|
||||||
|
level: 2,
|
||||||
|
name: "Drone CI",
|
||||||
|
path: admin_settings_services_path(params: { s: "droneci" }),
|
||||||
|
icon: Setting.droneci_enabled? ? "check" : "x",
|
||||||
|
active: current_page?(admin_settings_services_path(params: { s: "droneci" })),
|
||||||
|
) %>
|
||||||
<%= render SidenavLinkComponent.new(
|
<%= render SidenavLinkComponent.new(
|
||||||
level: 2,
|
level: 2,
|
||||||
name: "ejabberd",
|
name: "ejabberd",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user