fix
This commit is contained in:
@@ -133,10 +133,11 @@ def append_stage(to, key, val, files):
|
|||||||
"""Append a value in {to}[{key}], create the array if not existing. if the key-file is found in the files add a custom suffix"""
|
"""Append a value in {to}[{key}], create the array if not existing. if the key-file is found in the files add a custom suffix"""
|
||||||
if not key in to:
|
if not key in to:
|
||||||
to[key] = []
|
to[key] = []
|
||||||
if "{basename}.yaml".format(basename=val) in files:
|
# Not possible right now
|
||||||
to[key].append("{stage}-custom".format(stage=val))
|
#if "{basename}.yaml".format(basename=val) in files:
|
||||||
else:
|
# to[key].append("{stage}-custom".format(stage=val))
|
||||||
to[key].append(val)
|
#else:
|
||||||
|
to[key].append(val)
|
||||||
|
|
||||||
|
|
||||||
def set_js_stages(stages, config, files, root_dir):
|
def set_js_stages(stages, config, files, root_dir):
|
||||||
|
|||||||
@@ -158,27 +158,6 @@ spec:
|
|||||||
workspaces:
|
workspaces:
|
||||||
- name: shared-workspace
|
- name: shared-workspace
|
||||||
workspace: source
|
workspace: source
|
||||||
- name: lint-shell-custom
|
|
||||||
onError: continue
|
|
||||||
when:
|
|
||||||
- input: "lint-shell-custom"
|
|
||||||
operator: in
|
|
||||||
values: ["$(params.stages[*])"]
|
|
||||||
params:
|
|
||||||
- name: args
|
|
||||||
value: $(tasks.detect-stages.results.shellcheck-args)
|
|
||||||
taskRef:
|
|
||||||
resolver: git
|
|
||||||
params:
|
|
||||||
- name: url
|
|
||||||
value: $(params.git-url)
|
|
||||||
- name: revision
|
|
||||||
value: $(params.git-revision)
|
|
||||||
- name: pathInRepo
|
|
||||||
value: ".tekton/lint-shell.yaml"
|
|
||||||
workspaces:
|
|
||||||
- name: shared-workspace
|
|
||||||
workspace: source
|
|
||||||
- name: lint-docker
|
- name: lint-docker
|
||||||
onError: continue
|
onError: continue
|
||||||
when:
|
when:
|
||||||
@@ -193,27 +172,6 @@ spec:
|
|||||||
value: $(tasks.detect-stages.results.file-docker)
|
value: $(tasks.detect-stages.results.file-docker)
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: source
|
- name: source
|
||||||
- name: lint-docker-custom
|
|
||||||
onError: continue
|
|
||||||
when:
|
|
||||||
- input: "lint-docker-custom"
|
|
||||||
operator: in
|
|
||||||
values: ["$(params.stages[*])"]
|
|
||||||
taskRef:
|
|
||||||
resolver: git
|
|
||||||
params:
|
|
||||||
- name: url
|
|
||||||
value: $(params.git-url)
|
|
||||||
- name: revision
|
|
||||||
value: $(params.git-revision)
|
|
||||||
- name: pathInRepo
|
|
||||||
value: ".tekton/lint-docker.yaml"
|
|
||||||
matrix:
|
|
||||||
params:
|
|
||||||
- name: dockerfile-path
|
|
||||||
value: $(tasks.detect-stages.results.file-docker)
|
|
||||||
workspaces:
|
|
||||||
- name: source
|
|
||||||
- name: lint-yaml
|
- name: lint-yaml
|
||||||
onError: continue
|
onError: continue
|
||||||
when:
|
when:
|
||||||
@@ -228,27 +186,6 @@ spec:
|
|||||||
workspaces:
|
workspaces:
|
||||||
- name: shared-workspace
|
- name: shared-workspace
|
||||||
workspace: source
|
workspace: source
|
||||||
- name: lint-yaml-custom
|
|
||||||
onError: continue
|
|
||||||
when:
|
|
||||||
- input: "lint-yaml-custom"
|
|
||||||
operator: in
|
|
||||||
values: ["$(params.stages[*])"]
|
|
||||||
params:
|
|
||||||
- name: args
|
|
||||||
value: ["."]
|
|
||||||
taskRef:
|
|
||||||
resolver: git
|
|
||||||
params:
|
|
||||||
- name: url
|
|
||||||
value: $(params.git-url)
|
|
||||||
- name: revision
|
|
||||||
value: $(params.git-revision)
|
|
||||||
- name: pathInRepo
|
|
||||||
value: ".tekton/lint-yaml.yaml"
|
|
||||||
workspaces:
|
|
||||||
- name: shared-workspace
|
|
||||||
workspace: source
|
|
||||||
- name: lint-black
|
- name: lint-black
|
||||||
onError: continue
|
onError: continue
|
||||||
when:
|
when:
|
||||||
@@ -263,27 +200,6 @@ spec:
|
|||||||
workspaces:
|
workspaces:
|
||||||
- name: shared-workspace
|
- name: shared-workspace
|
||||||
workspace: source
|
workspace: source
|
||||||
- name: lint-black-custom
|
|
||||||
onError: continue
|
|
||||||
when:
|
|
||||||
- input: "lint-black-custom"
|
|
||||||
operator: in
|
|
||||||
values: ["$(params.stages[*])"]
|
|
||||||
params:
|
|
||||||
- name: args
|
|
||||||
value: $(tasks.detect-stages.results.black-args)
|
|
||||||
taskRef:
|
|
||||||
resolver: git
|
|
||||||
params:
|
|
||||||
- name: url
|
|
||||||
value: $(params.git-url)
|
|
||||||
- name: revision
|
|
||||||
value: $(params.git-revision)
|
|
||||||
- name: pathInRepo
|
|
||||||
value: ".tekton/lint-black.yaml"
|
|
||||||
workspaces:
|
|
||||||
- name: shared-workspace
|
|
||||||
workspace: source
|
|
||||||
- name: lint-python
|
- name: lint-python
|
||||||
onError: continue
|
onError: continue
|
||||||
when:
|
when:
|
||||||
@@ -298,44 +214,6 @@ spec:
|
|||||||
workspaces:
|
workspaces:
|
||||||
- name: shared-workspace
|
- name: shared-workspace
|
||||||
workspace: source
|
workspace: source
|
||||||
- name: lint-python-custom
|
|
||||||
onError: continue
|
|
||||||
when:
|
|
||||||
- input: "lint-python"
|
|
||||||
operator: in
|
|
||||||
values: ["$(params.stages[*])"]
|
|
||||||
params:
|
|
||||||
- name: args
|
|
||||||
value: $(tasks.detect-stages.results.pylint-args)
|
|
||||||
taskRef:
|
|
||||||
resolver: git
|
|
||||||
params:
|
|
||||||
- name: url
|
|
||||||
value: $(params.git-url)
|
|
||||||
- name: revision
|
|
||||||
value: $(params.git-revision)
|
|
||||||
- name: pathInRepo
|
|
||||||
value: ".tekton/lint-python.yaml"
|
|
||||||
workspaces:
|
|
||||||
- name: shared-workspace
|
|
||||||
workspace: source
|
|
||||||
- name: lint-custom
|
|
||||||
onError: continue
|
|
||||||
when:
|
|
||||||
- input: "lint-custom"
|
|
||||||
operator: in
|
|
||||||
values: ["$(params.stages[*])"]
|
|
||||||
taskRef:
|
|
||||||
resolver: git
|
|
||||||
params:
|
|
||||||
- name: url
|
|
||||||
value: $(params.git-url)
|
|
||||||
- name: revision
|
|
||||||
value: $(params.git-revision)
|
|
||||||
- name: pathInRepo
|
|
||||||
value: ".tekton/lint-custom.yaml"
|
|
||||||
workspaces:
|
|
||||||
- name: source
|
|
||||||
- name: publish-docker
|
- name: publish-docker
|
||||||
runAfter: ["lint-shell","lint-shell-custom","lint-docker","lint-docker-custom","lint-yaml","lint-yaml-custom","lint-black","lint-black-custom","lint-python","lint-python-custom","lint-custom"]
|
runAfter: ["lint-shell","lint-shell-custom","lint-docker","lint-docker-custom","lint-yaml","lint-yaml-custom","lint-black","lint-black-custom","lint-python","lint-python-custom","lint-custom"]
|
||||||
when:
|
when:
|
||||||
|
|||||||
@@ -142,27 +142,6 @@ spec:
|
|||||||
workspaces:
|
workspaces:
|
||||||
- name: shared-workspace
|
- name: shared-workspace
|
||||||
workspace: source
|
workspace: source
|
||||||
- name: lint-shell-custom
|
|
||||||
onError: stopAndFail
|
|
||||||
when:
|
|
||||||
- input: "lint-shell-custom"
|
|
||||||
operator: in
|
|
||||||
values: ["$(params.stages[*])"]
|
|
||||||
params:
|
|
||||||
- name: args
|
|
||||||
value: $(tasks.detect-stages.results.shellcheck-args)
|
|
||||||
taskRef:
|
|
||||||
resolver: git
|
|
||||||
params:
|
|
||||||
- name: url
|
|
||||||
value: $(params.git-url)
|
|
||||||
- name: revision
|
|
||||||
value: $(params.git-revision)
|
|
||||||
- name: pathInRepo
|
|
||||||
value: ".tekton/lint-shell.yaml"
|
|
||||||
workspaces:
|
|
||||||
- name: shared-workspace
|
|
||||||
workspace: source
|
|
||||||
- name: lint-docker
|
- name: lint-docker
|
||||||
onError: stopAndFail
|
onError: stopAndFail
|
||||||
when:
|
when:
|
||||||
@@ -177,27 +156,6 @@ spec:
|
|||||||
value: $(tasks.detect-stages.results.file-docker)
|
value: $(tasks.detect-stages.results.file-docker)
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: source
|
- name: source
|
||||||
- name: lint-docker-custom
|
|
||||||
onError: stopAndFail
|
|
||||||
when:
|
|
||||||
- input: "lint-docker-custom"
|
|
||||||
operator: in
|
|
||||||
values: ["$(params.stages[*])"]
|
|
||||||
taskRef:
|
|
||||||
resolver: git
|
|
||||||
params:
|
|
||||||
- name: url
|
|
||||||
value: $(params.git-url)
|
|
||||||
- name: revision
|
|
||||||
value: $(params.git-revision)
|
|
||||||
- name: pathInRepo
|
|
||||||
value: ".tekton/lint-docker.yaml"
|
|
||||||
matrix:
|
|
||||||
params:
|
|
||||||
- name: dockerfile-path
|
|
||||||
value: $(tasks.detect-stages.results.file-docker)
|
|
||||||
workspaces:
|
|
||||||
- name: source
|
|
||||||
- name: lint-yaml
|
- name: lint-yaml
|
||||||
onError: stopAndFail
|
onError: stopAndFail
|
||||||
when:
|
when:
|
||||||
@@ -212,27 +170,6 @@ spec:
|
|||||||
workspaces:
|
workspaces:
|
||||||
- name: shared-workspace
|
- name: shared-workspace
|
||||||
workspace: source
|
workspace: source
|
||||||
- name: lint-yaml-custom
|
|
||||||
onError: stopAndFail
|
|
||||||
when:
|
|
||||||
- input: "lint-yaml-custom"
|
|
||||||
operator: in
|
|
||||||
values: ["$(params.stages[*])"]
|
|
||||||
params:
|
|
||||||
- name: args
|
|
||||||
value: ["."]
|
|
||||||
taskRef:
|
|
||||||
resolver: git
|
|
||||||
params:
|
|
||||||
- name: url
|
|
||||||
value: $(params.git-url)
|
|
||||||
- name: revision
|
|
||||||
value: $(params.git-revision)
|
|
||||||
- name: pathInRepo
|
|
||||||
value: ".tekton/lint-yaml.yaml"
|
|
||||||
workspaces:
|
|
||||||
- name: shared-workspace
|
|
||||||
workspace: source
|
|
||||||
- name: lint-black
|
- name: lint-black
|
||||||
onError: stopAndFail
|
onError: stopAndFail
|
||||||
when:
|
when:
|
||||||
@@ -247,27 +184,6 @@ spec:
|
|||||||
workspaces:
|
workspaces:
|
||||||
- name: shared-workspace
|
- name: shared-workspace
|
||||||
workspace: source
|
workspace: source
|
||||||
- name: lint-black-custom
|
|
||||||
onError: stopAndFail
|
|
||||||
when:
|
|
||||||
- input: "lint-black-custom"
|
|
||||||
operator: in
|
|
||||||
values: ["$(params.stages[*])"]
|
|
||||||
params:
|
|
||||||
- name: args
|
|
||||||
value: $(tasks.detect-stages.results.black-args)
|
|
||||||
taskRef:
|
|
||||||
resolver: git
|
|
||||||
params:
|
|
||||||
- name: url
|
|
||||||
value: $(params.git-url)
|
|
||||||
- name: revision
|
|
||||||
value: $(params.git-revision)
|
|
||||||
- name: pathInRepo
|
|
||||||
value: ".tekton/lint-black.yaml"
|
|
||||||
workspaces:
|
|
||||||
- name: shared-workspace
|
|
||||||
workspace: source
|
|
||||||
- name: lint-python
|
- name: lint-python
|
||||||
onError: stopAndFail
|
onError: stopAndFail
|
||||||
when:
|
when:
|
||||||
@@ -282,44 +198,6 @@ spec:
|
|||||||
workspaces:
|
workspaces:
|
||||||
- name: shared-workspace
|
- name: shared-workspace
|
||||||
workspace: source
|
workspace: source
|
||||||
- name: lint-python-custom
|
|
||||||
onError: stopAndFail
|
|
||||||
when:
|
|
||||||
- input: "lint-python"
|
|
||||||
operator: in
|
|
||||||
values: ["$(params.stages[*])"]
|
|
||||||
params:
|
|
||||||
- name: args
|
|
||||||
value: $(tasks.detect-stages.results.pylint-args)
|
|
||||||
taskRef:
|
|
||||||
resolver: git
|
|
||||||
params:
|
|
||||||
- name: url
|
|
||||||
value: $(params.git-url)
|
|
||||||
- name: revision
|
|
||||||
value: $(params.git-revision)
|
|
||||||
- name: pathInRepo
|
|
||||||
value: ".tekton/lint-python.yaml"
|
|
||||||
workspaces:
|
|
||||||
- name: shared-workspace
|
|
||||||
workspace: source
|
|
||||||
- name: lint-custom
|
|
||||||
onError: stopAndFail
|
|
||||||
when:
|
|
||||||
- input: "lint-custom"
|
|
||||||
operator: in
|
|
||||||
values: ["$(params.stages[*])"]
|
|
||||||
taskRef:
|
|
||||||
resolver: git
|
|
||||||
params:
|
|
||||||
- name: url
|
|
||||||
value: $(params.git-url)
|
|
||||||
- name: revision
|
|
||||||
value: $(params.git-revision)
|
|
||||||
- name: pathInRepo
|
|
||||||
value: ".tekton/lint-custom.yaml"
|
|
||||||
workspaces:
|
|
||||||
- name: source
|
|
||||||
- name: publish-docker
|
- name: publish-docker
|
||||||
runAfter: ["lint-shell","lint-shell-custom","lint-docker","lint-docker-custom","lint-yaml","lint-yaml-custom","lint-black","lint-black-custom","lint-python","lint-python-custom","lint-custom"]
|
runAfter: ["lint-shell","lint-shell-custom","lint-docker","lint-docker-custom","lint-yaml","lint-yaml-custom","lint-black","lint-black-custom","lint-python","lint-python-custom","lint-custom"]
|
||||||
when:
|
when:
|
||||||
|
|||||||
Reference in New Issue
Block a user