mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
add more validation to rules.yaml
We need to better catch problems like the one we fixed in:
7b6a3d6a33
Essentially a copy-paste error where had a branch pointing to staging/src/k8s.io/code-generator instead of staging/src/k8s.io/apimachinery
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
parent
7061704297
commit
ffef2d1f1a
@ -81,6 +81,10 @@ def main():
|
|||||||
# And skip validation of publishing rules for it
|
# And skip validation of publishing rules for it
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
for item in rule["branches"]:
|
||||||
|
if not item["source"]["dir"].endswith(rule["destination"]):
|
||||||
|
raise Exception("copy/paste error `%s` refers to `%s`" % (rule["destination"],item["source"]["dir"]))
|
||||||
|
|
||||||
if branch["name"] != "master":
|
if branch["name"] != "master":
|
||||||
raise Exception("cannot find master branch for destination %s" % rule["destination"])
|
raise Exception("cannot find master branch for destination %s" % rule["destination"])
|
||||||
if branch["source"]["branch"] != "master":
|
if branch["source"]["branch"] != "master":
|
||||||
|
Loading…
Reference in New Issue
Block a user