fix: [nomad-validate] update glob to *.hcl for forgejo.hcl validation
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/nomad-validate Pipeline failed
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/nomad-validate Pipeline failed
ci/woodpecker/pr/secret-scan Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline failed
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/nomad-validate Pipeline failed
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/nomad-validate Pipeline failed
ci/woodpecker/pr/secret-scan Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline failed
This commit is contained in:
parent
4a1b31af5b
commit
35f4f0e7c7
1 changed files with 6 additions and 6 deletions
|
|
@ -68,15 +68,15 @@ steps:
|
||||||
#
|
#
|
||||||
# Validation is offline: no running Nomad server is required (exit 0 on
|
# Validation is offline: no running Nomad server is required (exit 0 on
|
||||||
# valid HCL, 1 on syntax/semantic error). The CLI takes a single path
|
# valid HCL, 1 on syntax/semantic error). The CLI takes a single path
|
||||||
# argument so we loop over every `*.nomad.hcl` file under nomad/jobs/ —
|
# argument so we loop over every `*.hcl` file under nomad/jobs/ —
|
||||||
# that way a new jobspec PR gets CI coverage automatically (no separate
|
# that way a new jobspec PR gets CI coverage automatically (no separate
|
||||||
# "edit the pipeline" step to forget). The `.nomad.hcl` suffix is the
|
# "edit the pipeline" step to forget). The `.hcl` suffix is the naming
|
||||||
# naming convention documented in nomad/AGENTS.md; anything else in
|
# convention: anything else in nomad/jobs/ is deliberately not validated
|
||||||
# nomad/jobs/ is deliberately not validated by this step.
|
# by this step.
|
||||||
#
|
#
|
||||||
# `[ -f "$f" ]` guards against the no-match case: POSIX sh does not
|
# `[ -f "$f" ]` guards against the no-match case: POSIX sh does not
|
||||||
# nullglob, so an empty jobs/ directory would leave the literal glob in
|
# nullglob, so an empty jobs/ directory would leave the literal glob in
|
||||||
# "$f" and fail. Today forgejo.nomad.hcl exists, but the guard keeps the
|
# "$f" and fail. Today forgejo.hcl exists, but the guard keeps the
|
||||||
# step safe during any future transient empty state.
|
# step safe during any future transient empty state.
|
||||||
#
|
#
|
||||||
# Scope note: offline validate catches jobspec-level errors (unknown
|
# Scope note: offline validate catches jobspec-level errors (unknown
|
||||||
|
|
@ -91,7 +91,7 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
set -e
|
set -e
|
||||||
for f in nomad/jobs/*.nomad.hcl; do
|
for f in nomad/jobs/*.hcl; do
|
||||||
[ -f "$f" ] || continue
|
[ -f "$f" ] || continue
|
||||||
echo "validating jobspec: $f"
|
echo "validating jobspec: $f"
|
||||||
nomad job validate "$f"
|
nomad job validate "$f"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue