fix
This commit is contained in:
@@ -44,7 +44,16 @@ def load_config(root_dir, ci_root_dir):
|
||||
"""Load the configuration from the configuration directory."""
|
||||
ret = {
|
||||
"files": [],
|
||||
"languages": ["markdown", "docker", "rust", "shell", "python", "yaml", "js", "make"],
|
||||
"languages": [
|
||||
"markdown",
|
||||
"docker",
|
||||
"rust",
|
||||
"shell",
|
||||
"python",
|
||||
"yaml",
|
||||
"js",
|
||||
"make",
|
||||
],
|
||||
"markdown": {"extentions": ["md"], "mdl-args": ["."]},
|
||||
"docker": {"extentions": ["Dockerfile"]},
|
||||
"rust": {"extentions": ["rs"]},
|
||||
@@ -64,10 +73,7 @@ def load_config(root_dir, ci_root_dir):
|
||||
"extentions": ["ts", "js"],
|
||||
"files": ["package.json", "yarn.lock", "schema.prisma"],
|
||||
},
|
||||
"make": {
|
||||
"files": ["Makefile"],
|
||||
"checkmake-args": []
|
||||
},
|
||||
"make": {"files": ["Makefile"], "checkmake-args": []},
|
||||
}
|
||||
if not os.path.isdir(ci_root_dir):
|
||||
return ret
|
||||
@@ -236,10 +242,14 @@ def get_results(config, files, root_dir):
|
||||
else []
|
||||
),
|
||||
"kubelint-args": (
|
||||
config["yaml"]["kube"]["kubelint-args"] if "kube" in config["yaml"] and "kubelint-args" in config["yaml"]["kube"] else []
|
||||
config["yaml"]["kube"]["kubelint-args"]
|
||||
if "kube" in config["yaml"] and "kubelint-args" in config["yaml"]["kube"]
|
||||
else []
|
||||
),
|
||||
"mdl-args": (
|
||||
config["markdown"]["mdl-args"] if "mdl-args" in config["markdown"] else ["."]
|
||||
config["markdown"]["mdl-args"]
|
||||
if "mdl-args" in config["markdown"]
|
||||
else ["."]
|
||||
),
|
||||
"black-args": (
|
||||
config["python"]["black-args"] if "black-args" in config["python"] else []
|
||||
|
||||
@@ -265,7 +265,7 @@ spec:
|
||||
- name: shared-workspace
|
||||
workspace: source
|
||||
- name: publish-docker
|
||||
runAfter: ["lint-make","lint-shell","lint-docker","lint-yaml","lint-black","lint-python"]
|
||||
runAfter: ["lint-md","lint-kube","lint-make","lint-shell","lint-docker","lint-yaml","lint-black","lint-python"]
|
||||
when:
|
||||
- input: "publish-docker"
|
||||
operator: in
|
||||
|
||||
@@ -249,7 +249,7 @@ spec:
|
||||
- name: shared-workspace
|
||||
workspace: source
|
||||
- name: publish-docker
|
||||
runAfter: ["lint-shell","lint-docker","lint-yaml","lint-black","lint-python"]
|
||||
runAfter: ["lint-md","lint-kube","lint-make","lint-shell","lint-docker","lint-yaml","lint-black","lint-python"]
|
||||
when:
|
||||
- input: "publish-docker"
|
||||
operator: in
|
||||
|
||||
Reference in New Issue
Block a user