Skip to content

Commit c766f23

Browse files
committed
chore: small developer improvements
- Use `make` variables to auto-detect target platform and not hardcode it. - Separate one of the aws tests to a little different cron time so it works (running both parallelly never worked). - Pass in `--base-installer-image` so when a developer runs `make image-installer` with some extensions `IMAGE_REGISTRY` is honored. Signed-off-by: Noel Georgi <git@frezbo.dev>
1 parent 73c9e91 commit c766f23

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

.github/workflows/integration-aws-nvidia-oss-cron.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2025-04-01T08:14:24Z by kres d903dae.
3+
# Generated on 2025-04-04T11:30:51Z by kres d903dae.
44

55
name: integration-aws-nvidia-oss-cron
66
concurrency:
77
group: ${{ github.head_ref || github.run_id }}
88
cancel-in-progress: true
99
"on":
1010
schedule:
11-
- cron: 30 7 * * *
11+
- cron: 30 5 * * *
1212
jobs:
1313
default:
1414
runs-on:

.kres.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2482,7 +2482,7 @@ spec:
24822482
- self-hosted
24832483
- generic # we can use generic here since the tests run against a remote talos cluster
24842484
crons:
2485-
- '30 7 * * *'
2485+
- '30 5 * * *'
24862486
triggerLabels:
24872487
- integration/aws-nvidia-oss
24882488
steps:

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,13 @@ hack-test-%: ## Runs the specified script in ./hack/test with well known environ
370370

371371
.PHONY: generate
372372
generate: ## Generates code from protobuf service definitions and machinery config.
373-
@$(MAKE) local-$@ DEST=./ PLATFORM=linux/amd64 EMBED_TARGET=embed-abbrev
373+
@$(MAKE) local-$@ DEST=./ PLATFORM=$(OPERATING_SYSTEM)/$(ARCH) EMBED_TARGET=embed-abbrev
374374

375375
.PHONY: docs
376376
docs: ## Generates the documentation for machine config, and talosctl.
377377
@rm -rf docs/configuration/*
378378
@rm -rf docs/talosctl/*
379-
@$(MAKE) local-$@ DEST=./ PLATFORM=linux/amd64
379+
@$(MAKE) local-$@ DEST=./ PLATFORM=$(OPERATING_SYSTEM)/$(ARCH)
380380

381381
.PHONY: docs-preview
382382
docs-preview: ## Starts a local preview of the documentation using Hugo in docker
@@ -456,7 +456,7 @@ image-%: ## Builds the specified image. Valid options are aws, azure, digital-oc
456456
@docker pull $(REGISTRY_AND_USERNAME)/imager:$(IMAGE_TAG_IN)
457457
@for platform in $(subst $(,),$(space),$(PLATFORM)); do \
458458
arch=$$(basename "$${platform}") && \
459-
docker run --rm -t -v /dev:/dev -v $(PWD)/$(ARTIFACTS):/secureboot:ro -v $(PWD)/$(ARTIFACTS):/out -e SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) --network=host --privileged $(REGISTRY_AND_USERNAME)/imager:$(IMAGE_TAG_IN) $* --arch $$arch $(IMAGER_ARGS) ; \
459+
docker run --rm -t -v /dev:/dev -v $(PWD)/$(ARTIFACTS):/secureboot:ro -v $(PWD)/$(ARTIFACTS):/out -e SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) --network=host --privileged $(REGISTRY_AND_USERNAME)/imager:$(IMAGE_TAG_IN) $* --arch $$arch --base-installer-image $(REGISTRY_AND_USERNAME)/installer-base:$(IMAGE_TAG_IN) $(IMAGER_ARGS) ; \
460460
done
461461

462462
.PHONY: images-essential
@@ -530,19 +530,19 @@ cache-create: installer imager ## Generate image cache.
530530
# Code Quality
531531

532532
api-descriptors: ## Generates API descriptors used to detect breaking API changes.
533-
@$(MAKE) local-api-descriptors DEST=./ PLATFORM=linux/amd64
533+
@$(MAKE) local-api-descriptors DEST=./ PLATFORM=$(OPERATING_SYSTEM)/$(ARCH)
534534

535535
fmt-go: ## Formats the source code.
536536
@docker run --rm -it -v $(PWD):/src -w /src -e GOTOOLCHAIN=local golang:$(GO_VERSION) bash -c "go install golang.org/x/tools/cmd/goimports@$(GOIMPORTS_VERSION) && goimports -w -local github.com/siderolabs/talos . && go install mvdan.cc/gofumpt@$(GOFUMPT_VERSION) && gofumpt -w ."
537537

538538
fmt-protobuf: ## Formats protobuf files.
539-
@$(MAKE) local-fmt-protobuf DEST=./ PLATFORM=linux/amd64
539+
@$(MAKE) local-fmt-protobuf DEST=./ PLATFORM=$(OPERATING_SYSTEM)/$(ARCH)
540540

541541
fmt: ## Formats the source code and protobuf files.
542542
@$(MAKE) fmt-go fmt-protobuf
543543

544544
lint-%: ## Runs the specified linter. Valid options are go, protobuf, and markdown (e.g. lint-go).
545-
@$(MAKE) target-lint-$* PLATFORM=linux/amd64
545+
@$(MAKE) target-lint-$* PLATFORM=$(OPERATING_SYSTEM)/$(ARCH)
546546

547547
lint: ## Runs linters on go, vulncheck, protobuf, and markdown file types.
548548
@$(MAKE) lint-go lint-vulncheck lint-protobuf lint-markdown
@@ -551,17 +551,17 @@ check-dirty: ## Verifies that source tree is not dirty
551551
@if test -n "`git status --porcelain`"; then echo "Source tree is dirty"; git status; git diff; exit 1 ; fi
552552

553553
go-mod-outdated: ## Runs the go-mod-oudated to show outdated dependencies.
554-
@$(MAKE) target-go-mod-outdated PLATFORM=linux/amd64
554+
@$(MAKE) target-go-mod-outdated PLATFORM=$(OPERATING_SYSTEM)/$(ARCH)
555555

556556
# Tests
557557

558558
.PHONY: unit-tests
559559
unit-tests: ## Performs unit tests.
560-
@$(MAKE) local-$@ DEST=$(ARTIFACTS) TARGET_ARGS="--allow security.insecure" PLATFORM=linux/amd64
560+
@$(MAKE) local-$@ DEST=$(ARTIFACTS) TARGET_ARGS="--allow security.insecure" PLATFORM=$(OPERATING_SYSTEM)/$(ARCH)
561561

562562
.PHONY: unit-tests-race
563563
unit-tests-race: ## Performs unit tests with race detection enabled.
564-
@$(MAKE) target-$@ TARGET_ARGS="--allow security.insecure" PLATFORM=linux/amd64
564+
@$(MAKE) target-$@ TARGET_ARGS="--allow security.insecure" PLATFORM=$(OPERATING_SYSTEM)/$(ARCH)
565565

566566
$(ARTIFACTS)/$(INTEGRATION_TEST_DEFAULT_TARGET)-amd64:
567567
@$(MAKE) local-$(INTEGRATION_TEST_DEFAULT_TARGET)-amd64 DEST=$(ARTIFACTS) PLATFORM=linux/amd64 WITH_RACE=true PUSH=false
@@ -711,8 +711,8 @@ sign-images: ## Run cosign to sign all images built by this Makefile.
711711
.PHONY: reproducibility-test
712712
reproducibility-test:
713713
@$(MAKE) reproducibility-test-local-initramfs
714-
@$(MAKE) reproducibility-test-docker-installer-base INSTALLER_ARCH=targetarch PLATFORM=linux/amd64
715-
@$(MAKE) reproducibility-test-docker-talos reproducibility-test-docker-imager reproducibility-test-docker-talosctl PLATFORM=linux/amd64
714+
@$(MAKE) reproducibility-test-docker-installer-base INSTALLER_ARCH=targetarch PLATFORM=$(OPERATING_SYSTEM)/$(ARCH)
715+
@$(MAKE) reproducibility-test-docker-talos reproducibility-test-docker-imager reproducibility-test-docker-talosctl PLATFORM=$(OPERATING_SYSTEM)/$(ARCH)
716716

717717
reproducibility-test-docker-%:
718718
@rm -rf _out1/ _out2/

0 commit comments

Comments
 (0)