fix
This commit is contained in:
153
share/gitea-tekton-org/tekton.dev_v1_Pipeline_auto-ci-push.yaml
Normal file
153
share/gitea-tekton-org/tekton.dev_v1_Pipeline_auto-ci-push.yaml
Normal file
@@ -0,0 +1,153 @@
|
||||
apiVersion: tekton.dev/v1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: auto-ci-push
|
||||
spec:
|
||||
workspaces:
|
||||
- name: source
|
||||
- name: ssh
|
||||
params:
|
||||
- name: artifactory-url
|
||||
default: docker.io
|
||||
description: The url of the current artifactory
|
||||
type: string
|
||||
- name: project-name
|
||||
description: The name of the current project
|
||||
type: string
|
||||
- name: project-path
|
||||
description: The path of the current project
|
||||
type: string
|
||||
- name: git-default-branch
|
||||
description: The git revision
|
||||
default: main
|
||||
- name: git-url
|
||||
type: string
|
||||
- name: git-revision
|
||||
type: string
|
||||
- name: branch-name
|
||||
type: string
|
||||
tasks:
|
||||
- name: git-clone
|
||||
params:
|
||||
- name: url
|
||||
value: $(params.git-url)
|
||||
- name: revision
|
||||
value: $(params.git-revision)
|
||||
- name: depth
|
||||
value: 0
|
||||
taskRef:
|
||||
name: git-clone
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: source
|
||||
- name: ssh-directory
|
||||
workspace: ssh
|
||||
- name: git-version
|
||||
runAfter: [git-clone]
|
||||
params:
|
||||
- name: branch
|
||||
value: $(params.branch-name)
|
||||
taskRef:
|
||||
name: git-version
|
||||
workspaces:
|
||||
- name: source
|
||||
- name: detect-stages
|
||||
runAfter: [git-version]
|
||||
params:
|
||||
- name: artifactory-url
|
||||
value: $(params.artifactory-url)
|
||||
- name: project-name
|
||||
value: $(params.project-name)
|
||||
- name: project-path
|
||||
value: $(params.project-path)
|
||||
taskRef:
|
||||
name: detect-stages
|
||||
workspaces:
|
||||
- name: source
|
||||
- name: lint-shell
|
||||
runAfter: [detect-stages]
|
||||
when:
|
||||
- input: "lint-shell"
|
||||
operator: in
|
||||
values: ["$(tasks.detect-stages.results.stages-lint[*])"]
|
||||
params:
|
||||
- name: args
|
||||
value: $(tasks.detect-stages.results.file-shell)
|
||||
taskRef:
|
||||
name: shellcheck
|
||||
workspaces:
|
||||
- name: shared-workspace
|
||||
workspace: source
|
||||
- name: lint-docker
|
||||
runAfter: [detect-stages]
|
||||
when:
|
||||
- input: "lint-docker"
|
||||
operator: in
|
||||
values: ["$(tasks.detect-stages.results.stages-lint[*])"]
|
||||
taskRef:
|
||||
name: hadolint
|
||||
matrix:
|
||||
params:
|
||||
- name: dockerfile-path
|
||||
value: $(tasks.detect-stages.results.file-docker)
|
||||
workspaces:
|
||||
- name: source
|
||||
- name: lint-yaml
|
||||
runAfter: [detect-stages]
|
||||
when:
|
||||
- input: "lint-yaml"
|
||||
operator: in
|
||||
values: ["$(tasks.detect-stages.results.lstages-int[*])"]
|
||||
params:
|
||||
- name: args
|
||||
value: ["."]
|
||||
taskRef:
|
||||
name: yaml-lint
|
||||
workspaces:
|
||||
- name: shared-workspace
|
||||
workspace: source
|
||||
- name: lint-black
|
||||
runAfter: [detect-stages]
|
||||
when:
|
||||
- input: "lint-black"
|
||||
operator: in
|
||||
values: ["$(tasks.detect-stages.results.stages-lint[*])"]
|
||||
params:
|
||||
- name: args
|
||||
value: ["--check", "--diff", "$(tasks.detect-stages.results.file-python[*])"]
|
||||
taskRef:
|
||||
name: black
|
||||
workspaces:
|
||||
- name: shared-workspace
|
||||
workspace: source
|
||||
- name: lint-python
|
||||
runAfter: [detect-stages]
|
||||
when:
|
||||
- input: "lint-python"
|
||||
operator: in
|
||||
values: ["$(tasks.detect-stages.results.stages-lint[*])"]
|
||||
params:
|
||||
- name: args
|
||||
value: ["$(tasks.detect-stages.results.file-python[*])"]
|
||||
taskRef:
|
||||
name: pylint
|
||||
workspaces:
|
||||
- name: shared-workspace
|
||||
workspace: source
|
||||
- name: publish-docker
|
||||
runAfter: [detect-stages, "$(tasks.detect-stages.results.stages-prepare[*])", "lint-docker", "$(tasks.detect-stages.results.stages-test[*])"]
|
||||
when:
|
||||
- input: "publish-docker"
|
||||
operator: in
|
||||
values: ["$(tasks.detect-stages.results.stages-publish[*])"]
|
||||
- input: $(params.branch-name)
|
||||
operator: in
|
||||
values: ["$(params.git-default-branch)"]
|
||||
taskRef:
|
||||
name: buildkit-daemonless
|
||||
matrix:
|
||||
params:
|
||||
- name: DOCKERFILE
|
||||
value: $(tasks.detect-stages.results.file-docker)
|
||||
workspaces:
|
||||
- name: source
|
||||
Reference in New Issue
Block a user