fix
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
apiVersion: tekton.dev/v1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: auto-ci-lint
|
||||
spec:
|
||||
workspaces:
|
||||
- name: source
|
||||
params:
|
||||
- name: on-error
|
||||
type: string
|
||||
default: stopAndFail
|
||||
- name: stages
|
||||
type: array
|
||||
- name: dockerfiles
|
||||
type: array
|
||||
default: []
|
||||
- name: shellcheck-args
|
||||
type: array
|
||||
default: []
|
||||
- name: black-args
|
||||
type: array
|
||||
default: []
|
||||
- name: pylint-args
|
||||
type: array
|
||||
default: []
|
||||
tasks:
|
||||
- name: lint-shell
|
||||
onError: $(params.on-error)
|
||||
when:
|
||||
- input: "lint-shell"
|
||||
operator: in
|
||||
values: ["$(params.stages[*])"]
|
||||
params:
|
||||
- name: args
|
||||
value: $(params.shellcheck-args)
|
||||
taskRef:
|
||||
name: shellcheck
|
||||
workspaces:
|
||||
- name: shared-workspace
|
||||
workspace: source
|
||||
- name: lint-docker
|
||||
onError: $(params.on-error)
|
||||
when:
|
||||
- input: "lint-docker"
|
||||
operator: in
|
||||
values: ["$(params.stages[*])"]
|
||||
taskRef:
|
||||
name: hadolint
|
||||
matrix:
|
||||
params:
|
||||
- name: dockerfile-path
|
||||
value: $(tasks.detect-stages.results.file-docker)
|
||||
workspaces:
|
||||
- name: source
|
||||
- name: lint-yaml
|
||||
onError: $(params.on-error)
|
||||
when:
|
||||
- input: "lint-yaml"
|
||||
operator: in
|
||||
values: ["$(params.stages[*])"]
|
||||
params:
|
||||
- name: args
|
||||
value: ["."]
|
||||
taskRef:
|
||||
name: yaml-lint
|
||||
workspaces:
|
||||
- name: shared-workspace
|
||||
workspace: source
|
||||
- name: lint-black
|
||||
onError: $(params.on-error)
|
||||
when:
|
||||
- input: "lint-black"
|
||||
operator: in
|
||||
values: ["$(params.stages[*])"]
|
||||
params:
|
||||
- name: args
|
||||
value: $(params.black-args)
|
||||
taskRef:
|
||||
name: black
|
||||
workspaces:
|
||||
- name: shared-workspace
|
||||
workspace: source
|
||||
- name: lint-python
|
||||
onError: $(params.on-error)
|
||||
when:
|
||||
- input: "lint-python"
|
||||
operator: in
|
||||
values: ["$(params.stages[*])"]
|
||||
params:
|
||||
- name: args
|
||||
value: ["$(tasks.detect-stages.results.file-python[*])"]
|
||||
taskRef:
|
||||
name: pylint
|
||||
workspaces:
|
||||
- name: shared-workspace
|
||||
workspace: source
|
||||
Reference in New Issue
Block a user