From f186cfdad1203cc93f2821218a2d41dbc782f993 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Wed, 8 Apr 2026 14:33:06 +0200 Subject: [PATCH] Update common container archs Promote the Prometheus container archs settings to common so they are used by default on other projects. * Add `.dockerignore` to sync script to include docker archs. Signed-off-by: SuperQ --- Makefile | 4 ---- Makefile.common | 4 +++- scripts/sync_repo_files.sh | 14 ++++++++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 13cc8f3d67..78aa91db0b 100644 --- a/Makefile +++ b/Makefile @@ -12,10 +12,6 @@ # limitations under the License. # Needs to be defined before including Makefile.common to auto-generate targets -DOCKER_ARCHS ?= amd64 armv7 arm64 ppc64le riscv64 s390x -DOCKERFILE_ARCH_EXCLUSIONS ?= Dockerfile.distroless:riscv64 -DOCKER_REGISTRY_ARCH_EXCLUSIONS ?= quay.io:riscv64 - UI_PATH = web/ui BUILD_UI ?= all UI_NODE_MODULES_PATH = $(UI_PATH)/node_modules diff --git a/Makefile.common b/Makefile.common index 52fe9daaf0..9079508462 100644 --- a/Makefile.common +++ b/Makefile.common @@ -90,7 +90,9 @@ ifdef DOCKERFILE_PATH $(error DOCKERFILE_PATH is deprecated. Use DOCKERFILE_VARIANTS ?= $(DOCKERFILE_PATH) in the Makefile) endif -DOCKER_ARCHS ?= amd64 +DOCKER_ARCHS ?= amd64 armv7 arm64 ppc64le riscv64 s390x +DOCKERFILE_ARCH_EXCLUSIONS ?= +DOCKER_REGISTRY_ARCH_EXCLUSIONS ?= quay.io:riscv64 DOCKERFILE_VARIANTS ?= $(wildcard Dockerfile Dockerfile.*) # Function to extract variant from Dockerfile label. diff --git a/scripts/sync_repo_files.sh b/scripts/sync_repo_files.sh index 04735475da..d5a7ac3e85 100755 --- a/scripts/sync_repo_files.sh +++ b/scripts/sync_repo_files.sh @@ -53,7 +53,7 @@ if [ -z "${GITHUB_TOKEN}" ]; then fi # List of files that should be synced. -SYNC_FILES="CODE_OF_CONDUCT.md LICENSE Makefile.common SECURITY.md .yamllint scripts/golangci-lint.yml .github/workflows/scorecards.yml .github/workflows/container_description.yml .github/workflows/stale.yml" +SYNC_FILES="CODE_OF_CONDUCT.md LICENSE Makefile.common SECURITY.md .dockerignore .yamllint scripts/golangci-lint.yml .github/workflows/scorecards.yml .github/workflows/container_description.yml .github/workflows/stale.yml" # Go to the root of the repo cd "$(git rev-parse --show-cdup)" || exit 1 @@ -144,9 +144,15 @@ process_repo() { repo_log "${org_repo} is not Go, skipping golangci-lint.yml." continue fi - if [[ "${source_file}" == '.github/workflows/container_description.yml' ]] && ! check_docker "${org_repo}" "${default_branch}" ; then - repo_log "${org_repo} has no Dockerfile, skipping container_description.yml." - continue + if ! check_docker "${org_repo}" "${default_branch}" ; then + if [[ "${source_file}" == '.dockerignore' ]] ; then + repo_log "${org_repo} has no Dockerfile, skipping .dockerignore." + continue + fi + if [[ "${source_file}" == '.github/workflows/container_description.yml' ]] ; then + repo_log "${org_repo} has no Dockerfile, skipping container_description.yml." + continue + fi fi if [[ "${source_file}" == 'LICENSE' ]] && ! check_license "${target_file}" ; then repo_log "LICENSE in ${org_repo} is not apache, skipping."