We need to add dependencies so we are now building a container.
This commit is contained in:
@@ -73,6 +73,35 @@ spec:
|
||||
value: $(params.PULL_BASE_SHA)
|
||||
- name: deleteExisting
|
||||
value: "true"
|
||||
- name: build-image
|
||||
taskRef:
|
||||
name: kaniko
|
||||
params:
|
||||
- name: IMAGE
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
- name: CONTEXT
|
||||
value: $(params.path-to-image-context)
|
||||
- name: DOCKERFILE
|
||||
value: $(params.path-to-dockerfile)
|
||||
- name: BUILDER_IMAGE
|
||||
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
||||
- name: EXTRA_ARGS
|
||||
value:
|
||||
- --cache=true
|
||||
- --cache-copy-layers
|
||||
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
|
||||
- --use-new-run # Should result in a speed-up
|
||||
- --reproducible # To remove timestamps so layer caching works.
|
||||
- --snapshot-mode=redo
|
||||
- --skip-unused-stages=true
|
||||
- --registry-mirror=dockerhub.dockerhub.svc.cluster.local
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: git-source
|
||||
- name: dockerconfig
|
||||
workspace: docker-credentials
|
||||
runAfter:
|
||||
- fetch-repository
|
||||
- name: clippy
|
||||
taskRef:
|
||||
name: run-docker-image
|
||||
@@ -82,22 +111,10 @@ spec:
|
||||
- name: cargo-cache
|
||||
workspace: cargo-cache
|
||||
runAfter:
|
||||
- fetch-repository
|
||||
- build-image
|
||||
params:
|
||||
- name: docker-image
|
||||
value: "rustlang/rust:nightly-alpine3.17"
|
||||
- name: command
|
||||
value:
|
||||
[
|
||||
cargo,
|
||||
clippy,
|
||||
--no-deps,
|
||||
--all-targets,
|
||||
--all-features,
|
||||
--,
|
||||
-D,
|
||||
warnings,
|
||||
]
|
||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||
finally:
|
||||
- name: report-success
|
||||
when:
|
||||
@@ -167,8 +184,8 @@ spec:
|
||||
timeout: 240h0m0s
|
||||
params:
|
||||
- name: image-name
|
||||
value: "harbor.fizz.buzz/private/organic-fmt"
|
||||
value: "harbor.fizz.buzz/private/organic-clippy"
|
||||
- name: path-to-image-context
|
||||
value: docker/cargo_fmt/
|
||||
value: docker/organic_clippy/
|
||||
- name: path-to-dockerfile
|
||||
value: docker/cargo_fmt/Dockerfile
|
||||
value: docker/organic_clippy/Dockerfile
|
||||
|
||||
Reference in New Issue
Block a user