Skip to content

Commit 9de1e85

Browse files
committed
ci: generate release hauls
Signed-off-by: Tyler Gillson <[email protected]>
1 parent c1bb230 commit 9de1e85

File tree

4 files changed

+95
-2
lines changed

4 files changed

+95
-2
lines changed

.github/workflows/release.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,20 @@ jobs:
1515
packages: write
1616
pull-requests: write
1717
secrets: inherit
18+
19+
haul:
20+
if: needs.call-release.outputs.releases_created == 'true'
21+
runs-on: [self-hosted, Linux, X64, validator]
22+
steps:
23+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
24+
with:
25+
submodules: recursive
26+
27+
- name: Generate Hauls for release
28+
run: make haul
29+
30+
- name: Attach Hauls to release
31+
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2
32+
with:
33+
tag_name: ${{ needs.call-release.outputs.tag_name }}
34+
files: ./validator-haul-linux-amd64.tar.zst,./validator-haul-darwin-arm64.tar.zst

Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,20 @@ CHART_NAME=validator
1010

1111
.PHONY: docker-build-certs-init
1212
docker-build-certs-init: ## Build validator-certs-init docker image.
13-
$(CONTAINER_TOOL) build -f hack/validator-certs-init.Dockerfile -t ${CERTS_INIT_IMG} . --platform linux/$(GOARCH)
13+
$(CONTAINER_TOOL) build -f hack/validator-certs-init.Dockerfile -t ${CERTS_INIT_IMG} . --platform linux/$(GOARCH)
14+
15+
PLATFORMS ?= linux/amd64 darwin/arm64
16+
.PHONY: haul
17+
haul: hauler ## Generate Hauls for latest release
18+
$(foreach platform,$(PLATFORMS),\
19+
$(eval GOOS=$(word 1,$(subst /, ,$(platform)))) \
20+
$(eval GOARCH=$(word 2,$(subst /, ,$(platform)))) \
21+
echo "Building Haul for $(GOOS)/$(GOARCH)..."; \
22+
hauler store sync -s store-$(GOOS)-$(GOARCH) -f hauler-manifest.yaml -p $(platform); \
23+
hauler store save -s store-$(GOOS)-$(GOARCH) -f validator-haul-$(GOOS)-$(GOARCH).tar.zst; \
24+
rm -rf store-$(GOOS)-$(GOARCH);
25+
26+
HAULER_VERSION ?= 1.0.4
27+
.PHONY: hauler
28+
hauler: ## Install hauler
29+
curl -sfL https://get.hauler.dev | HAULER_VERSION=$(HAULER_VERSION) bash

build

hauler-manifest.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
apiVersion: content.hauler.cattle.io/v1alpha1
2+
kind: Images
3+
metadata:
4+
name: validator-images
5+
spec:
6+
images:
7+
- name: quay.io/validator-labs/validator:v0.0.44
8+
- name: quay.io/validator-labs/validator-plugin-aws:v0.1.1
9+
- name: quay.io/validator-labs/validator-plugin-azure:v0.0.12
10+
- name: quay.io/validator-labs/validator-plugin-kubescape:v0.0.3
11+
- name: quay.io/validator-labs/validator-plugin-maas:v0.0.4
12+
- name: quay.io/validator-labs/validator-plugin-network:v0.0.17
13+
- name: quay.io/validator-labs/validator-plugin-oci:v0.0.10
14+
- name: quay.io/validator-labs/validator-plugin-vsphere:v0.0.26
15+
- name: quay.io/validator-labs/validator-certs-init:1.0.0
16+
- name: gcr.io/spectro-images-public/release/spectro-cleanup:1.2.0
17+
- name: gcr.io/kubebuilder/kube-rbac-proxy:v0.15.0
18+
- name: gcr.io/kubebuilder/kube-rbac-proxy:v0.16.0
19+
# TODO: align on a single kube-rbac-proxy image
20+
# TODO: handle kind image; requires changes in validatorctl
21+
---
22+
apiVersion: content.hauler.cattle.io/v1alpha1
23+
kind: Charts
24+
metadata:
25+
name: validator-charts
26+
spec:
27+
charts:
28+
- name: validator
29+
repoURL: https://validator-labs.github.io/validator
30+
version: 0.0.44
31+
- name: validator-plugin-aws
32+
repoURL: https://validator-labs.github.io/validator-plugin-aws
33+
version: 0.1.1
34+
- name: validator-plugin-azure
35+
repoURL: https://validator-labs.github.io/validator-plugin-azure
36+
version: 0.0.12
37+
- name: validator-plugin-kubescape
38+
repoURL: https://validator-labs.github.io/validator-plugin-kubescape
39+
version: 0.0.3
40+
- name: validator-plugin-maas
41+
repoURL: https://validator-labs.github.io/validator-plugin-maas
42+
version: 0.0.4
43+
- name: validator-plugin-network
44+
repoURL: https://validator-labs.github.io/validator-plugin-network
45+
version: 0.0.17
46+
- name: validator-plugin-oci
47+
repoURL: https://validator-labs.github.io/validator-plugin-oci
48+
version: 0.0.10
49+
- name: validator-plugin-vsphere
50+
repoURL: https://validator-labs.github.io/validator-plugin-vsphere
51+
version: 0.0.26
52+
---
53+
apiVersion: content.hauler.cattle.io/v1alpha1
54+
kind: Files
55+
metadata:
56+
name: validator-files
57+
spec:
58+
files:
59+
- name: validatorctl
60+
path: https://github.com/validator-labs/validatorctl/releases/download/v0.0.3/validator-linux-amd64

0 commit comments

Comments
 (0)