eficode-academy / kubernetes-katas

Deliberate exercises for Kubernetes
265 stars 275 forks source link

ci(lint): fixes k8s yaml extraction logic when running on linux #61

Closed Addono closed 3 years ago

Addono commented 3 years ago

A difference between how xargs works on Mac vs Ubuntu caused the K8s snippets detected from inline Markdown not be picked up by the linter when running on Ubuntu based CI drivers.

In the output, this caused warning to be printed in the runner, but the command did not error. image

This change replaces the use of xargs by instead directly using the -exec argument from find, which is tested to work similarly on both OSes.

Addono commented 3 years ago

Nice bit of trivia, the "Lint"-workflow had two jobs, of which only outdated-kubernetes was affected, since the other one was already running on a MacOS-based runner. Both jobs use this K8s YAML extraction from Markdown script, so after seeing it pass in one job it was tempting to assume it also did for the second one. Assumptions are the mother of all... 😅

sofusalbertsen commented 3 years ago

Wil happily merge changes in, thanks @Addono !