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