@@ -8,24 +8,29 @@ version: 2
88
99before :
1010 hooks :
11- - mkdir -p ./out /helm
11+ - mkdir -p ./_artifacts /helm
1212 - >-
1313 helm package ./charts/cluster-api-provider-oxide
1414 --version {{ .Version }}
1515 --app-version {{ .Version }}
16- --destination ./out /helm
16+ --destination ./_artifacts /helm
1717 - >-
1818 helm package ./charts/cluster-api-provider-oxide-crds
1919 --version {{ .Version }}
2020 --app-version {{ .Version }}
21- --destination ./out/helm
21+ --destination ./_artifacts/helm
22+ # Render the clusterctl provider components manifest (into ./out) against
23+ # the image published by the ko pipe below. IfNotPresent because release
24+ # tags are immutable.
25+ - >-
26+ IMAGE_TAG={{ .Version }} make manifests
2227
2328# ko re-builds the binary itself using these settings (results are cached from
2429# the build pipe). CGO is disabled so the image can run on the distroless base.
2530builds :
26- - id : manager
31+ - id : capox
2732 main : ./cmd
28- binary : manager
33+ binary : capox
2934 env :
3035 - CGO_ENABLED=0
3136 flags :
@@ -40,14 +45,14 @@ builds:
4045# (docker login to ghcr.io); the base image defaults to the distroless,
4146# nonroot cgr.dev/chainguard/static.
4247kos :
43- - build : manager
48+ - build : capox
4449 repositories :
4550 - ghcr.io/oxidecomputer/cluster-api-provider-oxide
4651 platforms :
4752 - linux/amd64
4853 - linux/arm64
4954 tags :
50- - " {{ .Tag }}"
55+ - " {{ .Version }}"
5156 - latest
5257 # Push to the bare repo (no import-path or MD5 suffix).
5358 bare : true
5964checksum :
6065 name_template : " checksums.txt"
6166 extra_files :
62- - glob : ./out/helm/*.tgz
67+ - glob : ./_artifacts/helm/*.tgz
68+ - glob : ./_artifacts/infrastructure-components.yaml
69+ - glob : ./metadata.yaml
70+
71+ # Attach the clusterctl provider artifacts to the GitHub release so
72+ # `clusterctl init --infrastructure oxide` can discover and install the
73+ # provider. metadata.yaml maps release versions to CAPI contract versions and
74+ # must accompany the components manifest.
75+ release :
76+ extra_files :
77+ - glob : ./_artifacts/infrastructure-components.yaml
78+ - glob : ./metadata.yaml
6379
6480publishers :
6581 - name : helm-oci
6682 ids :
6783 - helm-only
6884 extra_files :
69- - glob : ./out /helm/*.tgz
85+ - glob : ./_artifacts /helm/*.tgz
7086 cmd : helm push "{{ abs .ArtifactPath }}" "oci://{{ .Env.HELM_OCI_REPO }}"
7187 env :
7288 - HELM_OCI_REPO={{ .Env.HELM_OCI_REPO }}
0 commit comments