woodpecker integration
This commit is contained in:
@@ -29,6 +29,12 @@ Rails.application.config.to_prepare do
|
||||
# c.ci_extension_public_key_url = "https://ci.example.org/api/signature/public-key"
|
||||
# c.ci_update_server = nil # nil: the request base_url
|
||||
|
||||
# Woodpecker CI management — repo sync, secret provisioning, pipeline control.
|
||||
# All three must be set for the management features to activate.
|
||||
# c.woodpecker_url = ENV["WOODPECKER_URL"] # e.g. "https://ci.example.org"
|
||||
# c.woodpecker_api_token = ENV["WOODPECKER_API_TOKEN"] # Woodpecker PAT with admin access
|
||||
# c.woodpecker_repo_owner = ENV["WOODPECKER_REPO_OWNER"] # forge org/user (e.g. "games")
|
||||
|
||||
# Size cap in bytes for /build/upload (and the admin file manager, default: 500MB).
|
||||
# c.max_upload_size = 500 * 1024 * 1024
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@ module WarpEngine
|
||||
def self.configure
|
||||
yield(config)
|
||||
end
|
||||
|
||||
def self.woodpecker_configured?
|
||||
config.woodpecker_url.present? && config.woodpecker_api_token.present?
|
||||
end
|
||||
end
|
||||
|
||||
require "warp_engine/engine"
|
||||
|
||||
@@ -20,6 +20,9 @@ module WarpEngine
|
||||
# PEM, or a URL to fetch it from (e.g. https://ci.../api/signature/public-key).
|
||||
# With neither set, POST /build/config rejects every request.
|
||||
# ci_update_server: server URL written into the upload/publish steps; nil → the request's base_url.
|
||||
# woodpecker_url / woodpecker_api_token / woodpecker_repo_owner:
|
||||
# Woodpecker CI management (repo sync, secret provisioning, pipeline control).
|
||||
# All nil → the management features are inactive.
|
||||
attr_accessor :file_container_path,
|
||||
:image_container_path,
|
||||
:update_secret,
|
||||
@@ -31,6 +34,9 @@ module WarpEngine
|
||||
:ci_extension_public_key,
|
||||
:ci_extension_public_key_url,
|
||||
:ci_update_server,
|
||||
:woodpecker_url,
|
||||
:woodpecker_api_token,
|
||||
:woodpecker_repo_owner,
|
||||
:image_owners
|
||||
|
||||
def initialize
|
||||
@@ -45,6 +51,9 @@ module WarpEngine
|
||||
@ci_extension_public_key = nil
|
||||
@ci_extension_public_key_url = nil
|
||||
@ci_update_server = nil
|
||||
@woodpecker_url = ENV["WOODPECKER_URL"]
|
||||
@woodpecker_api_token = ENV["WOODPECKER_API_TOKEN"]
|
||||
@woodpecker_repo_owner = ENV["WOODPECKER_REPO_OWNER"]
|
||||
@image_owners = []
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user