Skip to content

cat function not available in webhook template engine (hooks.json validation failure) #143

@Ghusn-Mhsen

Description

@Ghusn-Mhsen

When deploying soulteary/webhook:7.0.0 in Docker Swarm, the service fails to start due to a template validation error in hooks.json.

The error is:

Configuration validation failed: found 1 error(s)
- hook-file[/etc/webhook/hooks.json]: cannot load hook file /etc/webhook/hooks.json: template: hooks:44: function "cat" not defined

Root Cause:

"value": "Bearer {{ cat \"/run/secrets/webhook-token\" | trimSpace }}"

However, the webhook template engine does not provide the cat function in its built-in Go template function set.

As a result, the configuration fails during startup validation.

Related Issue:

This may be related to or overlapping with:

👉 https://github.com/adnanh/webhook/issues/748

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions