website icon indicating copy to clipboard operation
website copied to clipboard

Implement strict Hugo checks in the CICD pipeline

Open mblag opened this issue 3 weeks ago • 4 comments

Currently, when configuration files (such as hugo.toml, netlify.toml, or i18n configuration files) are modified the pipeline does not enforce a strict Hugo validation. This allows configuration errors or missing variables to slip into the main branch, which can break site builds and cause silent issues later on. Such as the one described in https://github.com/kubernetes/website/pull/59080

Introduce a mechanism to run strict Hugo validation using --panicOnWarning or treating warnings as errors. This approach should catch structural and configuration errors early in the CI pipeline without disrupting the workflow.

As briefly discussed this approach has two steps

  1. Introduce an ENV HUGO_FLAGS in the k/website Makefile targets that is empty by default or in the future more flags added to it
  2. Add the --panicOnWarning flag in the k/test-infra PROW flow when https://github.com/kubernetes/test-infra/pull/36793 is merged

/sig docs /area web-development /kind feature

mblag avatar Nov 07 '26 10:11 mblag

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

kubernetes-prow[bot] avatar Nov 07 '26 10:11 kubernetes-prow[bot]

Hi! I'd be interested in contributing to this issue. I'd be happy to work on the Makefile and Prow CI changes. Please let me know if it's open for community contribution. Thanks!

ParthrChandurkar avatar Nov 07 '26 13:11 ParthrChandurkar

Thanks so much for the interest @ParthrChandurkar ! I have opened a PR for the first point and waiting a request to be merged to test-infra repo to continue with the second step. If there is anything additional after triage will let you know.

mblag avatar Nov 07 '26 14:11 mblag

/assign

mblag avatar Nov 08 '26 07:11 mblag