Skip to content

Commit 9f2b98d

Browse files
committed
[dx] Remove BUILDER and PLATFORM autodetection logic
Signed-off-by: Andrei Kvapil <[email protected]>
1 parent 7090b8a commit 9f2b98d

18 files changed

Lines changed: 32 additions & 133 deletions

File tree

‎packages/apps/clickhouse/Makefile‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,11 @@ generate:
88

99
image:
1010
docker buildx build images/clickhouse-backup \
11-
--provenance false \
12-
--builder=$(BUILDER) \
13-
--platform=$(PLATFORM) \
1411
--tag $(REGISTRY)/clickhouse-backup:$(call settag,$(CLICKHOUSE_BACKUP_TAG)) \
1512
--cache-from type=registry,ref=$(REGISTRY)/clickhouse-backup:latest \
1613
--cache-to type=inline \
1714
--metadata-file images/clickhouse-backup.json \
18-
--push=$(PUSH) \
19-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
20-
--load=$(LOAD)
15+
$(BUILDX_ARGS)
2116
echo "$(REGISTRY)/clickhouse-backup:$(call settag,$(CLICKHOUSE_BACKUP_TAG))@$$(yq e '."containerimage.digest"' images/clickhouse-backup.json -o json -r)" \
2217
> images/clickhouse-backup.tag
2318
rm -f images/clickhouse-backup.json

‎packages/apps/http-cache/Makefile‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,11 @@ image: image-nginx
77

88
image-nginx:
99
docker buildx build images/nginx-cache \
10-
--provenance false \
11-
--builder=$(BUILDER) \
12-
--platform=$(PLATFORM) \
1310
--tag $(REGISTRY)/nginx-cache:$(call settag,$(NGINX_CACHE_TAG)) \
1411
--cache-from type=registry,ref=$(REGISTRY)/nginx-cache:latest \
1512
--cache-to type=inline \
1613
--metadata-file images/nginx-cache.json \
17-
--push=$(PUSH) \
18-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
19-
--load=$(LOAD)
14+
$(BUILDX_ARGS)
2015
echo "$(REGISTRY)/nginx-cache:$(call settag,$(NGINX_CACHE_TAG))@$$(yq e '."containerimage.digest"' images/nginx-cache.json -o json -r)" \
2116
> images/nginx-cache.tag
2217
rm -f images/nginx-cache.json

‎packages/apps/kubernetes/Makefile‎

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,37 @@ image: image-ubuntu-container-disk image-kubevirt-cloud-provider image-kubevirt-
1212

1313
image-ubuntu-container-disk:
1414
docker buildx build images/ubuntu-container-disk \
15-
--provenance false \
16-
--builder=$(BUILDER) \
17-
--platform=$(PLATFORM) \
1815
--build-arg KUBERNETES_VERSION=${KUBERNETES_VERSION} \
1916
--tag $(REGISTRY)/ubuntu-container-disk:$(call settag,$(KUBERNETES_VERSION)) \
2017
--tag $(REGISTRY)/ubuntu-container-disk:$(call settag,$(KUBERNETES_VERSION)-$(TAG)) \
2118
--cache-from type=registry,ref=$(REGISTRY)/ubuntu-container-disk:latest \
2219
--cache-to type=inline \
2320
--metadata-file images/ubuntu-container-disk.json \
24-
--push=$(PUSH) \
25-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
26-
--load=$(LOAD)
21+
$(BUILDX_ARGS)
2722
echo "$(REGISTRY)/ubuntu-container-disk:$(call settag,$(KUBERNETES_VERSION))@$$(yq e '."containerimage.digest"' images/ubuntu-container-disk.json -o json -r)" \
2823
> images/ubuntu-container-disk.tag
2924
rm -f images/ubuntu-container-disk.json
3025

3126
image-kubevirt-cloud-provider:
3227
docker buildx build images/kubevirt-cloud-provider \
33-
--provenance false \
34-
--builder=$(BUILDER) \
35-
--platform=$(PLATFORM) \
3628
--tag $(REGISTRY)/kubevirt-cloud-provider:$(call settag,$(KUBERNETES_PKG_TAG)) \
3729
--tag $(REGISTRY)/kubevirt-cloud-provider:$(call settag,$(KUBERNETES_PKG_TAG)-$(TAG)) \
3830
--cache-from type=registry,ref=$(REGISTRY)/kubevirt-cloud-provider:latest \
3931
--cache-to type=inline \
4032
--metadata-file images/kubevirt-cloud-provider.json \
41-
--push=$(PUSH) \
42-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
43-
--load=$(LOAD)
33+
$(BUILDX_ARGS)
4434
echo "$(REGISTRY)/kubevirt-cloud-provider:$(call settag,$(KUBERNETES_PKG_TAG))@$$(yq e '."containerimage.digest"' images/kubevirt-cloud-provider.json -o json -r)" \
4535
> images/kubevirt-cloud-provider.tag
4636
rm -f images/kubevirt-cloud-provider.json
4737

4838
image-kubevirt-csi-driver:
4939
docker buildx build images/kubevirt-csi-driver \
50-
--provenance false \
51-
--builder=$(BUILDER) \
52-
--platform=$(PLATFORM) \
5340
--tag $(REGISTRY)/kubevirt-csi-driver:$(call settag,$(KUBERNETES_PKG_TAG)) \
5441
--tag $(REGISTRY)/kubevirt-csi-driver:$(call settag,$(KUBERNETES_PKG_TAG)-$(TAG)) \
5542
--cache-from type=registry,ref=$(REGISTRY)/kubevirt-csi-driver:latest \
5643
--cache-to type=inline \
5744
--metadata-file images/kubevirt-csi-driver.json \
58-
--push=$(PUSH) \
59-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
60-
--load=$(LOAD)
45+
$(BUILDX_ARGS)
6146
echo "$(REGISTRY)/kubevirt-csi-driver:$(call settag,$(KUBERNETES_PKG_TAG))@$$(yq e '."containerimage.digest"' images/kubevirt-csi-driver.json -o json -r)" \
6247
> images/kubevirt-csi-driver.tag
6348
IMAGE=$$(cat images/kubevirt-csi-driver.tag) \
@@ -67,17 +52,12 @@ image-kubevirt-csi-driver:
6752

6853
image-cluster-autoscaler:
6954
docker buildx build images/cluster-autoscaler \
70-
--provenance false \
71-
--builder=$(BUILDER) \
72-
--platform=$(PLATFORM) \
7355
--tag $(REGISTRY)/cluster-autoscaler:$(call settag,$(KUBERNETES_PKG_TAG)) \
7456
--tag $(REGISTRY)/cluster-autoscaler:$(call settag,$(KUBERNETES_PKG_TAG)-$(TAG)) \
7557
--cache-from type=registry,ref=$(REGISTRY)/cluster-autoscaler:latest \
7658
--cache-to type=inline \
7759
--metadata-file images/cluster-autoscaler.json \
78-
--push=$(PUSH) \
79-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
80-
--load=$(LOAD)
60+
$(BUILDX_ARGS)
8161
echo "$(REGISTRY)/cluster-autoscaler:$(call settag,$(KUBERNETES_PKG_TAG))@$$(yq e '."containerimage.digest"' images/cluster-autoscaler.json -o json -r)" \
8262
> images/cluster-autoscaler.tag
8363
rm -f images/cluster-autoscaler.json

‎packages/apps/mysql/Makefile‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,11 @@ generate:
88

99
image:
1010
docker buildx build images/mariadb-backup \
11-
--provenance false \
12-
--builder=$(BUILDER) \
13-
--platform=$(PLATFORM) \
1411
--tag $(REGISTRY)/mariadb-backup:$(call settag,$(MARIADB_BACKUP_TAG)) \
1512
--cache-from type=registry,ref=$(REGISTRY)/mariadb-backup:latest \
1613
--cache-to type=inline \
1714
--metadata-file images/mariadb-backup.json \
18-
--push=$(PUSH) \
19-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
20-
--load=$(LOAD)
15+
$(BUILDX_ARGS)
2116
echo "$(REGISTRY)/mariadb-backup:$(call settag,$(MARIADB_BACKUP_TAG))@$$(yq e '."containerimage.digest"' images/mariadb-backup.json -o json -r)" \
2217
> images/mariadb-backup.tag
2318
rm -f images/mariadb-backup.json

‎packages/core/installer/Makefile‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,11 @@ image: pre-checks image-matchbox image-cozystack image-talos
2424

2525
image-cozystack:
2626
docker buildx build -f images/cozystack/Dockerfile ../../.. \
27-
--provenance false \
2827
--tag $(REGISTRY)/installer:$(call settag,$(TAG)) \
2928
--cache-from type=registry,ref=$(REGISTRY)/installer:latest \
30-
--platform linux/amd64 \
3129
--cache-to type=inline \
3230
--metadata-file images/installer.json \
33-
--push=$(PUSH) \
34-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
35-
--load=$(LOAD)
31+
$(BUILDX_ARGS)
3632
IMAGE="$(REGISTRY)/installer:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/installer.json -o json -r)" \
3733
yq -i '.cozystack.image = strenv(IMAGE)' values.yaml
3834
rm -f images/installer.json
@@ -45,15 +41,12 @@ image-matchbox:
4541
test -f ../../../_out/assets/kernel-amd64 || make talos-kernel
4642
test -f ../../../_out/assets/initramfs-metal-amd64.xz || make talos-initramfs
4743
docker buildx build -f images/matchbox/Dockerfile ../../.. \
48-
--provenance false \
4944
--tag $(REGISTRY)/matchbox:$(call settag,$(TAG)) \
5045
--tag $(REGISTRY)/matchbox:$(call settag,$(TALOS_VERSION)-$(TAG)) \
5146
--cache-from type=registry,ref=$(REGISTRY)/matchbox:latest \
5247
--cache-to type=inline \
5348
--metadata-file images/matchbox.json \
54-
--push=$(PUSH) \
55-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
56-
--load=$(LOAD)
49+
$(BUILDX_ARGS)
5750
echo "$(REGISTRY)/matchbox:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/matchbox.json -o json -r)" \
5851
> ../../extra/bootbox/images/matchbox.tag
5952
rm -f images/matchbox.json

‎packages/core/testing/Makefile‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,11 @@ image: image-e2e-sandbox
1616

1717
image-e2e-sandbox:
1818
docker buildx build -f images/e2e-sandbox/Dockerfile images/e2e-sandbox \
19-
--provenance false \
20-
--builder=$(BUILDER) \
21-
--platform=$(PLATFORM) \
2219
--tag $(REGISTRY)/e2e-sandbox:$(call settag,$(TAG)) \
2320
--cache-from type=registry,ref=$(REGISTRY)/e2e-sandbox:latest \
2421
--cache-to type=inline \
2522
--metadata-file images/e2e-sandbox.json \
26-
--push=$(PUSH) \
27-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
28-
--load=$(LOAD)
23+
$(BUILDX_ARGS)
2924
IMAGE="$(REGISTRY)/e2e-sandbox:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/e2e-sandbox.json -o json -r)" \
3025
yq -i '.e2e.image = strenv(IMAGE)' values.yaml
3126
rm -f images/e2e-sandbox.json

‎packages/extra/monitoring/Makefile‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@ generate:
1010

1111
image:
1212
docker buildx build images/grafana \
13-
--provenance false \
14-
--builder=$(BUILDER) \
15-
--platform=$(PLATFORM) \
1613
--tag $(REGISTRY)/grafana:$(call settag,$(GRAFANA_TAG)) \
1714
--cache-from type=registry,ref=$(REGISTRY)/grafana:latest \
1815
--cache-to type=inline \
1916
--metadata-file images/grafana.json \
20-
--push=$(PUSH) \
21-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
22-
--load=$(LOAD)
17+
$(BUILDX_ARGS)
2318
echo "$(REGISTRY)/grafana:$(call settag,$(GRAFANA_TAG))@$$(yq e '."containerimage.digest"' images/grafana.json -o json -r)" \
2419
> images/grafana.tag
2520
rm -f images/grafana.json

‎packages/system/bucket/Makefile‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,11 @@ image: image-s3manager
1212

1313
image-s3manager:
1414
docker buildx build images/s3manager \
15-
--provenance false \
16-
--builder=$(BUILDER) \
17-
--platform=$(PLATFORM) \
1815
--tag $(REGISTRY)/s3manager:$(call settag,$(S3MANAGER_TAG)) \
1916
--cache-from type=registry,ref=$(REGISTRY)/s3manager:latest \
2017
--cache-to type=inline \
2118
--metadata-file images/s3manager.json \
22-
--push=$(PUSH) \
23-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
24-
--load=$(LOAD)
19+
$(BUILDX_ARGS)
2520
echo "$(REGISTRY)/s3manager:$(call settag,$(S3MANAGER_TAG))@$$(yq e '."containerimage.digest"' images/s3manager.json -o json -r)" \
2621
> images/s3manager.tag
2722
rm -f images/s3manager.json

‎packages/system/cilium/Makefile‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,12 @@ update:
1717

1818
image:
1919
docker buildx build images/cilium \
20-
--provenance false \
21-
--builder=$(BUILDER) \
22-
--platform=$(PLATFORM) \
2320
--tag $(REGISTRY)/cilium:$(call settag,$(CILIUM_TAG)) \
2421
--tag $(REGISTRY)/cilium:$(call settag,$(CILIUM_TAG)-$(TAG)) \
2522
--cache-from type=registry,ref=$(REGISTRY)/cilium:latest \
2623
--cache-to type=inline \
2724
--metadata-file images/cilium.json \
28-
--push=$(PUSH) \
29-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
30-
--load=$(LOAD)
25+
$(BUILDX_ARGS)
3126
REPOSITORY="$(REGISTRY)/cilium" \
3227
yq -i '.cilium.image.repository = strenv(REPOSITORY)' values.yaml
3328
TAG=$(call settag,$(CILIUM_TAG)) \

‎packages/system/cozystack-api/Makefile‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,11 @@ image: image-cozystack-api
88

99
image-cozystack-api:
1010
docker buildx build -f images/cozystack-api/Dockerfile ../../.. \
11-
--provenance false \
12-
--builder=$(BUILDER) \
13-
--platform=$(PLATFORM) \
1411
--tag $(REGISTRY)/cozystack-api:$(call settag,$(TAG)) \
1512
--cache-from type=registry,ref=$(REGISTRY)/cozystack-api:latest \
1613
--cache-to type=inline \
1714
--metadata-file images/cozystack-api.json \
18-
--push=$(PUSH) \
19-
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
20-
--load=$(LOAD)
15+
$(BUILDX_ARGS)
2116
IMAGE="$(REGISTRY)/cozystack-api:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/cozystack-api.json -o json -r)" \
2217
yq -i '.cozystackAPI.image = strenv(IMAGE)' values.yaml
2318
rm -f images/cozystack-api.json

0 commit comments

Comments
 (0)