Skip to content

Validation Error: unknown time zone. Add tzdata pkg to Dockerfile #3

@jlaberge-league

Description

@jlaberge-league

When running this action against alertmanager configs that contain time_intervals, and the location is set, the validation will fail as the timezone is not known.

The alpine:3 docker image does not contain tzdata, so the Dockerfile should add this package alongside the others.

# Without tzdata package
> amtool check-config alertmanager.yaml
Checking 'alertmanager.yaml'  FAILED: unknown time zone America/New_York

amtool: error: failed to validate 1 file(s)

# Add tzdata package
> apk add tzdata
(1/1) Installing tzdata (2023c-r1)
OK: 46 MiB in 28 packages
> amtool check-config alertmanager.yaml
Checking 'alertmanager.yaml'  SUCCESS
Found:
 - global config
 - route
 - 1 inhibit rules
 - 71 receivers
 - 1 templates
  SUCCESS

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