Inline clippy pipeline spec.
This commit is contained in:
parent
66f003e6fd
commit
4b85236c5f
@ -1,9 +1,13 @@
|
|||||||
apiVersion: tekton.dev/v1beta1
|
apiVersion: tekton.dev/v1beta1
|
||||||
kind: PipelineRun
|
kind: PipelineRun
|
||||||
metadata:
|
metadata:
|
||||||
name: clippy
|
name: rust-clippy
|
||||||
spec:
|
spec:
|
||||||
pipelineSpec:
|
pipelineSpec:
|
||||||
|
timeouts:
|
||||||
|
pipeline: "2h0m0s"
|
||||||
|
tasks: "1h0m40s"
|
||||||
|
finally: "0h30m0s"
|
||||||
params:
|
params:
|
||||||
- name: image-name
|
- name: image-name
|
||||||
description: The name for the built image
|
description: The name for the built image
|
||||||
@ -14,35 +18,17 @@ spec:
|
|||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
description: The path to the Dockerfile
|
description: The path to the Dockerfile
|
||||||
type: string
|
type: string
|
||||||
- name: GIT_USER_NAME
|
|
||||||
description: The username for git
|
|
||||||
type: string
|
|
||||||
default: "fluxcdbot"
|
|
||||||
- name: GIT_USER_EMAIL
|
|
||||||
description: The email for git
|
|
||||||
type: string
|
|
||||||
default: "fluxcdbot@users.noreply.github.com"
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: do-stuff
|
|
||||||
taskSpec:
|
|
||||||
metadata: {}
|
|
||||||
stepTemplate:
|
|
||||||
image: alpine:3.19
|
|
||||||
name: ""
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 10m
|
|
||||||
memory: 600Mi
|
|
||||||
workingDir: /workspace/source
|
|
||||||
steps:
|
|
||||||
- image: alpine:3.19
|
|
||||||
name: do-stuff-step
|
|
||||||
script: |
|
|
||||||
#!/usr/bin/env sh
|
|
||||||
echo "hello world"
|
|
||||||
- name: report-pending
|
- name: report-pending
|
||||||
taskRef:
|
taskRef:
|
||||||
name: gitea-set-status
|
resolver: git
|
||||||
|
params:
|
||||||
|
- name: url
|
||||||
|
value: https://github.com/tektoncd/catalog.git
|
||||||
|
- name: revision
|
||||||
|
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||||
|
- name: pathInRepo
|
||||||
|
value: task/gitea-set-status/0.1/gitea-set-status.yaml
|
||||||
runAfter:
|
runAfter:
|
||||||
- fetch-repository
|
- fetch-repository
|
||||||
params:
|
params:
|
||||||
@ -62,7 +48,14 @@ spec:
|
|||||||
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
||||||
- name: fetch-repository
|
- name: fetch-repository
|
||||||
taskRef:
|
taskRef:
|
||||||
name: git-clone
|
resolver: git
|
||||||
|
params:
|
||||||
|
- name: url
|
||||||
|
value: https://github.com/tektoncd/catalog.git
|
||||||
|
- name: revision
|
||||||
|
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||||
|
- name: pathInRepo
|
||||||
|
value: task/git-clone/0.9/git-clone.yaml
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: output
|
- name: output
|
||||||
workspace: git-source
|
workspace: git-source
|
||||||
@ -75,7 +68,14 @@ spec:
|
|||||||
value: "true"
|
value: "true"
|
||||||
- name: build-image
|
- name: build-image
|
||||||
taskRef:
|
taskRef:
|
||||||
name: kaniko
|
resolver: git
|
||||||
|
params:
|
||||||
|
- name: url
|
||||||
|
value: https://github.com/tektoncd/catalog.git
|
||||||
|
- name: revision
|
||||||
|
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||||
|
- name: pathInRepo
|
||||||
|
value: task/kaniko/0.6/kaniko.yaml
|
||||||
params:
|
params:
|
||||||
- name: IMAGE
|
- name: IMAGE
|
||||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
@ -102,9 +102,47 @@ spec:
|
|||||||
workspace: docker-credentials
|
workspace: docker-credentials
|
||||||
runAfter:
|
runAfter:
|
||||||
- fetch-repository
|
- fetch-repository
|
||||||
- name: clippy
|
- name: run-cargo-clippy
|
||||||
taskRef:
|
taskSpec:
|
||||||
name: run-docker-image
|
metadata: {}
|
||||||
|
params:
|
||||||
|
- name: docker-image
|
||||||
|
type: string
|
||||||
|
description: Docker image to run.
|
||||||
|
default: alpine:3.18
|
||||||
|
stepTemplate:
|
||||||
|
image: alpine:3.18
|
||||||
|
name: ""
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 600Mi
|
||||||
|
workingDir: /workspace/source
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
mountPath: /source
|
||||||
|
- name: cargo-cache
|
||||||
|
mountPath: /usr/local/cargo/registry
|
||||||
|
optional: true
|
||||||
|
steps:
|
||||||
|
- name: run
|
||||||
|
image: $(params.docker-image)
|
||||||
|
workingDir: "$(workspaces.source.path)"
|
||||||
|
command:
|
||||||
|
[
|
||||||
|
"cargo",
|
||||||
|
"clippy",
|
||||||
|
"--no-deps",
|
||||||
|
"--all-targets",
|
||||||
|
"--all-features",
|
||||||
|
"--",
|
||||||
|
"-D",
|
||||||
|
"warnings",
|
||||||
|
]
|
||||||
|
args: []
|
||||||
|
env:
|
||||||
|
- name: CARGO_TARGET_DIR
|
||||||
|
value: /target
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: source
|
- name: source
|
||||||
workspace: git-source
|
workspace: git-source
|
||||||
@ -122,7 +160,14 @@ spec:
|
|||||||
operator: in
|
operator: in
|
||||||
values: ["Succeeded", "Completed"]
|
values: ["Succeeded", "Completed"]
|
||||||
taskRef:
|
taskRef:
|
||||||
name: gitea-set-status
|
resolver: git
|
||||||
|
params:
|
||||||
|
- name: url
|
||||||
|
value: https://github.com/tektoncd/catalog.git
|
||||||
|
- name: revision
|
||||||
|
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||||
|
- name: pathInRepo
|
||||||
|
value: task/gitea-set-status/0.1/gitea-set-status.yaml
|
||||||
params:
|
params:
|
||||||
- name: CONTEXT
|
- name: CONTEXT
|
||||||
value: "$(params.JOB_NAME)"
|
value: "$(params.JOB_NAME)"
|
||||||
@ -144,7 +189,14 @@ spec:
|
|||||||
operator: in
|
operator: in
|
||||||
values: ["Failed"]
|
values: ["Failed"]
|
||||||
taskRef:
|
taskRef:
|
||||||
name: gitea-set-status
|
resolver: git
|
||||||
|
params:
|
||||||
|
- name: url
|
||||||
|
value: https://github.com/tektoncd/catalog.git
|
||||||
|
- name: revision
|
||||||
|
value: df36b3853a5657fd883015cdbf07ad6466918acf
|
||||||
|
- name: pathInRepo
|
||||||
|
value: task/gitea-set-status/0.1/gitea-set-status.yaml
|
||||||
params:
|
params:
|
||||||
- name: CONTEXT
|
- name: CONTEXT
|
||||||
value: "$(params.JOB_NAME)"
|
value: "$(params.JOB_NAME)"
|
||||||
@ -160,9 +212,46 @@ spec:
|
|||||||
value: failure
|
value: failure
|
||||||
- name: TARGET_URL
|
- name: TARGET_URL
|
||||||
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
||||||
|
- name: cargo-cache-autoclean
|
||||||
|
taskSpec:
|
||||||
|
metadata: {}
|
||||||
|
params:
|
||||||
|
- name: docker-image
|
||||||
|
type: string
|
||||||
|
description: Docker image to run.
|
||||||
|
default: alpine:3.18
|
||||||
|
stepTemplate:
|
||||||
|
image: alpine:3.18
|
||||||
|
name: ""
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 600Mi
|
||||||
|
workingDir: /workspace/source
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
mountPath: /source
|
||||||
|
- name: cargo-cache
|
||||||
|
mountPath: /usr/local/cargo/registry
|
||||||
|
optional: true
|
||||||
|
steps:
|
||||||
|
- name: run
|
||||||
|
image: $(params.docker-image)
|
||||||
|
workingDir: "$(workspaces.source.path)"
|
||||||
|
command: [cargo, cache, --autoclean]
|
||||||
|
args: []
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
workspace: git-source
|
||||||
|
- name: cargo-cache
|
||||||
|
workspace: cargo-cache
|
||||||
|
params:
|
||||||
|
- name: docker-image
|
||||||
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: git-source
|
- name: git-source
|
||||||
- name: docker-credentials
|
- name: docker-credentials
|
||||||
|
- name: cargo-cache
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: git-source
|
- name: git-source
|
||||||
volumeClaimTemplate:
|
volumeClaimTemplate:
|
||||||
@ -181,7 +270,6 @@ spec:
|
|||||||
secret:
|
secret:
|
||||||
secretName: harbor-plain
|
secretName: harbor-plain
|
||||||
serviceAccountName: build-bot
|
serviceAccountName: build-bot
|
||||||
timeout: 240h0m0s
|
|
||||||
params:
|
params:
|
||||||
- name: image-name
|
- name: image-name
|
||||||
value: "harbor.fizz.buzz/private/organic-clippy"
|
value: "harbor.fizz.buzz/private/organic-clippy"
|
@ -2,36 +2,36 @@ apiVersion: config.lighthouse.jenkins-x.io/v1alpha1
|
|||||||
kind: TriggerConfig
|
kind: TriggerConfig
|
||||||
spec:
|
spec:
|
||||||
postsubmits:
|
postsubmits:
|
||||||
- name: rustfmt
|
# - name: rustfmt
|
||||||
source: "pipeline-rustfmt.yaml"
|
# source: "pipeline-rustfmt.yaml"
|
||||||
# Override https-based url from lighthouse events.
|
# # Override https-based url from lighthouse events.
|
||||||
clone_uri: "git@code.fizz.buzz:talexander/organic.git"
|
# clone_uri: "git@code.fizz.buzz:talexander/organic.git"
|
||||||
branches:
|
# branches:
|
||||||
- ^main$
|
# - ^main$
|
||||||
- ^master$
|
# - ^master$
|
||||||
- name: rust-test
|
# - name: rust-test
|
||||||
source: "pipeline-rust-test.yaml"
|
# source: "pipeline-rust-test.yaml"
|
||||||
# Override https-based url from lighthouse events.
|
# # Override https-based url from lighthouse events.
|
||||||
clone_uri: "git@code.fizz.buzz:talexander/organic.git"
|
# clone_uri: "git@code.fizz.buzz:talexander/organic.git"
|
||||||
skip_branches:
|
# skip_branches:
|
||||||
# We already run on every commit, so running when the semver tags get pushed is causing needless double-processing.
|
# # We already run on every commit, so running when the semver tags get pushed is causing needless double-processing.
|
||||||
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
|
# - "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
|
||||||
- name: rust-foreign-document-test
|
# - name: rust-foreign-document-test
|
||||||
source: "pipeline-foreign-document-test.yaml"
|
# source: "pipeline-foreign-document-test.yaml"
|
||||||
# Override https-based url from lighthouse events.
|
# # Override https-based url from lighthouse events.
|
||||||
clone_uri: "git@code.fizz.buzz:talexander/organic.git"
|
# clone_uri: "git@code.fizz.buzz:talexander/organic.git"
|
||||||
skip_branches:
|
# skip_branches:
|
||||||
# We already run on every commit, so running when the semver tags get pushed is causing needless double-processing.
|
# # We already run on every commit, so running when the semver tags get pushed is causing needless double-processing.
|
||||||
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
|
# - "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
|
||||||
- name: rust-build
|
# - name: rust-build
|
||||||
source: "pipeline-rust-build.yaml"
|
# source: "pipeline-rust-build.yaml"
|
||||||
# Override https-based url from lighthouse events.
|
# # Override https-based url from lighthouse events.
|
||||||
clone_uri: "git@code.fizz.buzz:talexander/organic.git"
|
# clone_uri: "git@code.fizz.buzz:talexander/organic.git"
|
||||||
skip_branches:
|
# skip_branches:
|
||||||
# We already run on every commit, so running when the semver tags get pushed is causing needless double-processing.
|
# # We already run on every commit, so running when the semver tags get pushed is causing needless double-processing.
|
||||||
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
|
# - "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
|
||||||
- name: clippy
|
- name: clippy
|
||||||
source: "pipeline-clippy.yaml"
|
source: "pipeline-rust-clippy.yaml"
|
||||||
# Override https-based url from lighthouse events.
|
# Override https-based url from lighthouse events.
|
||||||
clone_uri: "git@code.fizz.buzz:talexander/organic.git"
|
clone_uri: "git@code.fizz.buzz:talexander/organic.git"
|
||||||
skip_branches:
|
skip_branches:
|
||||||
|
Loading…
Reference in New Issue
Block a user