Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,37 @@ if provider == "aliyun" || provider == "alioss"
options["bucket_name"] = l.p("#{scope}.aliyun_oss_bucket")
end

# WebDAV/dav support intentionally excluded (not fully implemented)
# Support both native storage-cli types (dav) AND legacy fog names (webdav)
# Legacy fog name support to be REMOVED May 2026
if provider == "webdav" || provider == "dav"
options["provider"] = provider
options["provider"] = "dav"
options["user"] = l.p("#{scope}.username")
options["password"] = l.p("#{scope}.password")
options["endpoint"] = l.p("#{scope}.public_endpoint")
add_optional(options, "secret", l.p("#{scope}.secret", nil))

# Resource-specific directory for compatibility with fog/webdav
resource_dir = l.p("cc.buildpacks.buildpack_directory_key", "cc-buildpacks")

# When using signed URLs (secret present), endpoint points to resource directory
# When using basic auth only (no secret), endpoint includes /admin/ prefix
secret = l.p("#{scope}.secret", nil)
base_endpoint = l.p("#{scope}.private_endpoint")

if secret.nil? || secret.empty?
options["endpoint"] = "#{base_endpoint}/admin/#{resource_dir}"
else
options["endpoint"] = "#{base_endpoint}/#{resource_dir}"
end

add_optional(options, "secret", secret)
add_optional(options, "signing_method", l.p("#{scope}.signing_method", nil))
add_optional(options, "retry_attempts", l.p("#{scope}.retry_attempts", nil))

# TLS nested object with a Cert inside
ca_cert=l.p("#{scope}.ca_cert",nil)
unless ca_cert.empty?
options["tls"]={"cert"=>ca_cert}
options["tls"]={"cert"=>{"ca"=>ca_cert}}
end
end

-%>
<%= JSON.pretty_generate(options) %>
<%= JSON.pretty_generate(options) %>
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,37 @@ if provider == "aliyun" || provider == "alioss"
options["bucket_name"] = l.p("#{scope}.aliyun_oss_bucket")
end

# WebDAV/dav support intentionally excluded (not fully implemented)
# Support both native storage-cli types (dav) AND legacy fog names (webdav)
# Legacy fog name support to be REMOVED May 2026
if provider == "webdav" || provider == "dav"
options["provider"] = provider
options["provider"] = "dav"
options["user"] = l.p("#{scope}.username")
options["password"] = l.p("#{scope}.password")
options["endpoint"] = l.p("#{scope}.public_endpoint")
add_optional(options, "secret", l.p("#{scope}.secret", nil))

# Resource-specific directory for compatibility with fog/webdav
resource_dir = l.p("cc.droplets.droplet_directory_key", "cc-droplets")

# When using signed URLs (secret present), endpoint points to resource directory
# When using basic auth only (no secret), endpoint includes /admin/ prefix
secret = l.p("#{scope}.secret", nil)
base_endpoint = l.p("#{scope}.private_endpoint")

if secret.nil? || secret.empty?
options["endpoint"] = "#{base_endpoint}/admin/#{resource_dir}"
else
options["endpoint"] = "#{base_endpoint}/#{resource_dir}"
end

add_optional(options, "secret", secret)
add_optional(options, "signing_method", l.p("#{scope}.signing_method", nil))
add_optional(options, "retry_attempts", l.p("#{scope}.retry_attempts", nil))

# TLS nested object with a Cert inside
ca_cert=l.p("#{scope}.ca_cert",nil)
unless ca_cert.empty?
options["tls"]={"cert"=>ca_cert}
options["tls"]={"cert"=>{"ca"=>ca_cert}}
end
end

-%>
<%= JSON.pretty_generate(options) %>
<%= JSON.pretty_generate(options) %>
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,37 @@ if provider == "aliyun" || provider == "alioss"
options["bucket_name"] = l.p("#{scope}.aliyun_oss_bucket")
end

# WebDAV/dav support intentionally excluded (not fully implemented)
# Support both native storage-cli types (dav) AND legacy fog names (webdav)
# Legacy fog name support to be REMOVED May 2026
if provider == "webdav" || provider == "dav"
options["provider"] = provider
options["provider"] = "dav"
options["user"] = l.p("#{scope}.username")
options["password"] = l.p("#{scope}.password")
options["endpoint"] = l.p("#{scope}.public_endpoint")
add_optional(options, "secret", l.p("#{scope}.secret", nil))

# Resource-specific directory for compatibility with fog/webdav
resource_dir = l.p("cc.packages.app_package_directory_key", "cc-packages")

# When using signed URLs (secret present), endpoint points to resource directory
# When using basic auth only (no secret), endpoint includes /admin/ prefix
secret = l.p("#{scope}.secret", nil)
base_endpoint = l.p("#{scope}.private_endpoint")

if secret.nil? || secret.empty?
options["endpoint"] = "#{base_endpoint}/admin/#{resource_dir}"
else
options["endpoint"] = "#{base_endpoint}/#{resource_dir}"
end

add_optional(options, "secret", secret)
add_optional(options, "signing_method", l.p("#{scope}.signing_method", nil))
add_optional(options, "retry_attempts", l.p("#{scope}.retry_attempts", nil))

# TLS nested object with a Cert inside
ca_cert=l.p("#{scope}.ca_cert",nil)
unless ca_cert.empty?
options["tls"]={"cert"=>ca_cert}
options["tls"]={"cert"=>{"ca"=>ca_cert}}
end
end

-%>
<%= JSON.pretty_generate(options) %>
<%= JSON.pretty_generate(options) %>
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,37 @@ if provider == "aliyun" || provider == "alioss"
options["bucket_name"] = l.p("#{scope}.aliyun_oss_bucket")
end

# WebDAV/dav support intentionally excluded (not fully implemented)
# Support both native storage-cli types (dav) AND legacy fog names (webdav)
# Legacy fog name support to be REMOVED May 2026
if provider == "webdav" || provider == "dav"
options["provider"] = provider
options["provider"] = "dav"
options["user"] = l.p("#{scope}.username")
options["password"] = l.p("#{scope}.password")
options["endpoint"] = l.p("#{scope}.public_endpoint")
add_optional(options, "secret", l.p("#{scope}.secret", nil))

# Resource-specific directory for compatibility with fog/webdav
resource_dir = l.p("cc.resource_pool.resource_directory_key", "cc-resources")

# When using signed URLs (secret present), endpoint points to resource directory
# When using basic auth only (no secret), endpoint includes /admin/ prefix
secret = l.p("#{scope}.secret", nil)
base_endpoint = l.p("#{scope}.private_endpoint")

if secret.nil? || secret.empty?
options["endpoint"] = "#{base_endpoint}/admin/#{resource_dir}"
else
options["endpoint"] = "#{base_endpoint}/#{resource_dir}"
end

add_optional(options, "secret", secret)
add_optional(options, "signing_method", l.p("#{scope}.signing_method", nil))
add_optional(options, "retry_attempts", l.p("#{scope}.retry_attempts", nil))

# TLS nested object with a Cert inside
ca_cert=l.p("#{scope}.ca_cert",nil)
unless ca_cert.empty?
options["tls"]={"cert"=>ca_cert}
options["tls"]={"cert"=>{"ca"=>ca_cert}}
end
end

-%>
<%= JSON.pretty_generate(options) %>
<%= JSON.pretty_generate(options) %>
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,38 @@ if provider == "aliyun" || provider == "alioss"
options["endpoint"] = l.p("#{scope}.aliyun_oss_endpoint")
options["bucket_name"] = l.p("#{scope}.aliyun_oss_bucket")
end

# WebDAV/dav support intentionally excluded (not fully implemented)

# Support both native storage-cli types (dav) AND legacy fog names (webdav)
# Legacy fog name support to be REMOVED May 2026
if provider == "webdav" || provider == "dav"
options["provider"] = provider
options["provider"] = "dav"
options["user"] = l.p("#{scope}.username")
options["password"] = l.p("#{scope}.password")
options["endpoint"] = l.p("#{scope}.public_endpoint")
add_optional(options, "secret", l.p("#{scope}.secret", nil))

# Resource-specific directory for compatibility with fog/webdav
resource_dir = l.p("cc.buildpacks.buildpack_directory_key", "cc-buildpacks")

# When using signed URLs (secret present), endpoint points to resource directory
# When using basic auth only (no secret), endpoint includes /admin/ prefix
secret = l.p("#{scope}.secret", nil)
base_endpoint = l.p("#{scope}.private_endpoint")

if secret.nil? || secret.empty?
options["endpoint"] = "#{base_endpoint}/admin/#{resource_dir}"
else
options["endpoint"] = "#{base_endpoint}/#{resource_dir}"
end

add_optional(options, "secret", secret)
add_optional(options, "signing_method", l.p("#{scope}.signing_method", nil))
add_optional(options, "retry_attempts", l.p("#{scope}.retry_attempts", nil))

# TLS nested object with a Cert inside
ca_cert=l.p("#{scope}.ca_cert",nil)
unless ca_cert.empty?
options["tls"]={"cert"=>ca_cert}
options["tls"]={"cert"=>{"ca"=>ca_cert}}
end
end

-%>
<%= JSON.pretty_generate(options) %>
<%= JSON.pretty_generate(options) %>
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,37 @@ if provider == "aliyun" || provider == "alioss"
options["bucket_name"] = l.p("#{scope}.aliyun_oss_bucket")
end

# WebDAV/dav support intentionally excluded (not fully implemented)
# Support both native storage-cli types (dav) AND legacy fog names (webdav)
# Legacy fog name support to be REMOVED May 2026
if provider == "webdav" || provider == "dav"
options["provider"] = provider
options["provider"] = "dav"
options["user"] = l.p("#{scope}.username")
options["password"] = l.p("#{scope}.password")
options["endpoint"] = l.p("#{scope}.public_endpoint")
add_optional(options, "secret", l.p("#{scope}.secret", nil))

# Resource-specific directory for compatibility with fog/webdav
resource_dir = l.p("cc.droplets.droplet_directory_key", "cc-droplets")

# When using signed URLs (secret present), endpoint points to resource directory
# When using basic auth only (no secret), endpoint includes /admin/ prefix
secret = l.p("#{scope}.secret", nil)
base_endpoint = l.p("#{scope}.private_endpoint")

if secret.nil? || secret.empty?
options["endpoint"] = "#{base_endpoint}/admin/#{resource_dir}"
else
options["endpoint"] = "#{base_endpoint}/#{resource_dir}"
end

add_optional(options, "secret", secret)
add_optional(options, "signing_method", l.p("#{scope}.signing_method", nil))
add_optional(options, "retry_attempts", l.p("#{scope}.retry_attempts", nil))

# TLS nested object with a Cert inside
ca_cert=l.p("#{scope}.ca_cert",nil)
unless ca_cert.empty?
options["tls"]={"cert"=>ca_cert}
options["tls"]={"cert"=>{"ca"=>ca_cert}}
end
end

-%>
<%= JSON.pretty_generate(options) %>
<%= JSON.pretty_generate(options) %>
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,37 @@ if provider == "aliyun" || provider == "alioss"
options["bucket_name"] = l.p("#{scope}.aliyun_oss_bucket")
end

# WebDAV/dav support intentionally excluded (not fully implemented)
# Support both native storage-cli types (dav) AND legacy fog names (webdav)
# Legacy fog name support to be REMOVED May 2026
if provider == "webdav" || provider == "dav"
options["provider"] = provider
options["provider"] = "dav"
options["user"] = l.p("#{scope}.username")
options["password"] = l.p("#{scope}.password")
options["endpoint"] = l.p("#{scope}.public_endpoint")
add_optional(options, "secret", l.p("#{scope}.secret", nil))

# Resource-specific directory for compatibility with fog/webdav
resource_dir = l.p("cc.packages.app_package_directory_key", "cc-packages")

# When using signed URLs (secret present), endpoint points to resource directory
# When using basic auth only (no secret), endpoint includes /admin/ prefix
secret = l.p("#{scope}.secret", nil)
base_endpoint = l.p("#{scope}.private_endpoint")

if secret.nil? || secret.empty?
options["endpoint"] = "#{base_endpoint}/admin/#{resource_dir}"
else
options["endpoint"] = "#{base_endpoint}/#{resource_dir}"
end

add_optional(options, "secret", secret)
add_optional(options, "signing_method", l.p("#{scope}.signing_method", nil))
add_optional(options, "retry_attempts", l.p("#{scope}.retry_attempts", nil))

# TLS nested object with a Cert inside
ca_cert=l.p("#{scope}.ca_cert",nil)
unless ca_cert.empty?
options["tls"]={"cert"=>ca_cert}
options["tls"]={"cert"=>{"ca"=>ca_cert}}
end
end

-%>
<%= JSON.pretty_generate(options) %>
<%= JSON.pretty_generate(options) %>
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,37 @@ if provider == "aliyun" || provider == "alioss"
options["bucket_name"] = l.p("#{scope}.aliyun_oss_bucket")
end

# WebDAV/dav support intentionally excluded (not fully implemented)
# Support both native storage-cli types (dav) AND legacy fog names (webdav)
# Legacy fog name support to be REMOVED May 2026
if provider == "webdav" || provider == "dav"
options["provider"] = provider
options["provider"] = "dav"
options["user"] = l.p("#{scope}.username")
options["password"] = l.p("#{scope}.password")
options["endpoint"] = l.p("#{scope}.public_endpoint")
add_optional(options, "secret", l.p("#{scope}.secret", nil))

# Resource-specific directory for compatibility with fog/webdav
resource_dir = l.p("cc.resource_pool.resource_directory_key", "cc-resources")

# When using signed URLs (secret present), endpoint points to resource directory
# When using basic auth only (no secret), endpoint includes /admin/ prefix
secret = l.p("#{scope}.secret", nil)
base_endpoint = l.p("#{scope}.private_endpoint")

if secret.nil? || secret.empty?
options["endpoint"] = "#{base_endpoint}/admin/#{resource_dir}"
else
options["endpoint"] = "#{base_endpoint}/#{resource_dir}"
end

add_optional(options, "secret", secret)
add_optional(options, "signing_method", l.p("#{scope}.signing_method", nil))
add_optional(options, "retry_attempts", l.p("#{scope}.retry_attempts", nil))

# TLS nested object with a Cert inside
ca_cert=l.p("#{scope}.ca_cert",nil)
unless ca_cert.empty?
options["tls"]={"cert"=>ca_cert}
options["tls"]={"cert"=>{"ca"=>ca_cert}}
end
end

-%>
<%= JSON.pretty_generate(options) %>
<%= JSON.pretty_generate(options) %>
Loading