Skip to content

Instantly share code, notes, and snippets.

@jwntrs
Last active February 23, 2022 14:13
Show Gist options
  • Save jwntrs/3519dced20bcfc517d0ff82a7c6d2ce1 to your computer and use it in GitHub Desktop.
Save jwntrs/3519dced20bcfc517d0ff82a7c6d2ce1 to your computer and use it in GitHub Desktop.
Multipath supply chain
apiVersion: carto.run/v1alpha1
kind: ClusterSupplyChain
metadata:
name: supply-chain
spec:
resources:
- name: source-provider
templateRef:
kind: ClusterSourceTemplate
options:
- name: source-from-git-repo
selector:
matchFields:
{ key: "spec.source.url", operation: exists }
- name: source-from-image-registry
selector:
matchFields:
{ key: "spec.source.image", operation: exists }
- name: source-tester
templateRef:
kind: ClusterSourceTemplate
name: test-source-with-tekton
selector:
matchLabels:
has-tests: "true"
sources:
- resource: source-provider
name: source
- name: image-provider
templateRef:
kind: ClusterImageTemplate
name: image-from-image-registry
selector:
matchFields:
{ key: "spec.image", operation: exists }
- name: image-builder
templateRef:
kind: ClusterImageTemplate
options:
- name: build-image
images:
- resource: source-tester
name: source
- name: build-image
images:
- resource: source-provider
name: source
- name: configure
templateRef:
kind: ClusterConfigTemplate
options:
- name: configure
sources:
- resource: image-builder
name: image
- name: configure
sources:
- resource: image-provider
name: image
- name: gitops
templateRef:
kind: ClusterSourceTemplate
options:
- name: git-pusher
selector:
matchLabels:
target: gitops
configs:
- resource: configure
name: config
- name: regops
templateRef:
kind: ClusterImageTemplate
options:
- name: registry-pusher
selector:
matchLabels:
target: repostiory
configs:
- resource: configure
name: config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment