From 3a94a376593dd05ccac5df4b6b9c230ac5dba4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=B3=BD=E8=BD=A9?= Date: Tue, 7 Jan 2025 17:19:41 +0800 Subject: [PATCH] ci: don't use unstable mirror (#832) Signed-off-by: spacewander --- .github/workflows/lint.yml | 3 +++ .github/workflows/test.yml | 5 +++++ .github/workflows/website.yml | 3 +++ api/tests/integration/testdata/services/grpc/Dockerfile | 2 +- common.mk | 5 +++-- controller/tests/testdata/services/docker-compose.yml | 4 ++-- e2e/base/nacos.yml | 2 +- examples/dev_your_plugin/Makefile | 5 +++-- 8 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f79f2184..bbf386cc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,6 +10,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }} cancel-in-progress: true +env: + IN_CI: true + jobs: lint: timeout-minutes: 10 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b6fb7f9..3b922d5f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,8 @@ concurrency: env: IN_CI: true + # default to the latest stable version + PROXY_IMAGE: envoyproxy/envoy:contrib-v1.32.0 jobs: api-module-test: @@ -276,6 +278,9 @@ jobs: misc-test: timeout-minutes: 10 runs-on: ubuntu-latest + env: + # TODO: remove this once the example uses the latest api module + PROXY_IMAGE: envoyproxy/envoy:contrib-v1.31.0 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index f866f836..d0d0e81d 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -14,6 +14,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }} cancel-in-progress: true +env: + IN_CI: true + jobs: check: timeout-minutes: 10 diff --git a/api/tests/integration/testdata/services/grpc/Dockerfile b/api/tests/integration/testdata/services/grpc/Dockerfile index b7cb4e0c..c3c84ca5 100644 --- a/api/tests/integration/testdata/services/grpc/Dockerfile +++ b/api/tests/integration/testdata/services/grpc/Dockerfile @@ -1,4 +1,4 @@ -FROM m.daocloud.io/docker.io/library/golang:1.21-bullseye +FROM docker.io/library/golang:1.21-bullseye WORKDIR /app COPY . /app diff --git a/common.mk b/common.mk index cc6a9a34..1b068a1b 100644 --- a/common.mk +++ b/common.mk @@ -25,7 +25,7 @@ $(LOCALBIN): TARGET_SO = libgolang.so PROJECT_NAME = mosn.io/htnn -DOCKER_MIRROR = m.daocloud.io/ +DOCKER_MIRROR ?= m.daocloud.io/ # Both images use glibc 2.31. Ensure libc in the images match each other. BUILD_IMAGE ?= $(DOCKER_MIRROR)docker.io/library/golang:1.22-bullseye @@ -58,7 +58,7 @@ GO_TARGETS = $(patsubst %.proto,%.pb.go,$(PROTO_FILES)) ENABLE_RACE ?= -race TEST_OPTION ?= -gcflags="all=-N -l" ${ENABLE_RACE} -covermode=atomic -coverprofile=cover.out -coverpkg=${PROJECT_NAME}/... -MOUNT_GOMOD_CACHE = -v $(shell go env GOPATH):/go +MOUNT_GOMOD_CACHE ?= -v $(shell go env GOPATH):/go ifeq ($(IN_CI), true) # Mount go mod cache in the CI environment will cause 'Permission denied' error # when accessing files on host in later phase because the mounted directory will @@ -66,4 +66,5 @@ ifeq ($(IN_CI), true) # Run as low privilege user in the Docker doesn't # work because we also need root to create /.cache in the Docker. MOUNT_GOMOD_CACHE = + DOCKER_MIRROR = endif diff --git a/controller/tests/testdata/services/docker-compose.yml b/controller/tests/testdata/services/docker-compose.yml index c65e4612..a4968c3a 100644 --- a/controller/tests/testdata/services/docker-compose.yml +++ b/controller/tests/testdata/services/docker-compose.yml @@ -42,7 +42,7 @@ services: networks: service: consul: - image: docker.m.daocloud.io/library/consul:1.15.4 + image: docker.io/library/consul:1.15.4 restart: unless-stopped ports: - "8500:8500" @@ -51,7 +51,7 @@ services: networks: service: consul1: - image: docker.m.daocloud.io/library/consul:1.15.4 + image: docker.io/library/consul:1.15.4 restart: unless-stopped ports: - "8501:8500" diff --git a/e2e/base/nacos.yml b/e2e/base/nacos.yml index 7134296a..5129ecba 100644 --- a/e2e/base/nacos.yml +++ b/e2e/base/nacos.yml @@ -29,7 +29,7 @@ spec: spec: containers: - name: nacos - image: m.daocloud.io/docker.io/nacos/nacos-server:v1.4.6-slim + image: docker.io/nacos/nacos-server:v1.4.6-slim ports: - containerPort: 8848 env: diff --git a/examples/dev_your_plugin/Makefile b/examples/dev_your_plugin/Makefile index de80cb24..7da53cc9 100644 --- a/examples/dev_your_plugin/Makefile +++ b/examples/dev_your_plugin/Makefile @@ -16,7 +16,7 @@ SHELL = /bin/bash TARGET_SO = libgolang.so PROJECT_NAME = mosn.io/htnn/dev_your_plugin -DOCKER_MIRROR = m.daocloud.io/ +DOCKER_MIRROR ?= m.daocloud.io/ # Both images use glibc 2.31. Ensure libc in the images match each other. BUILD_IMAGE ?= $(DOCKER_MIRROR)docker.io/library/golang:1.21-bullseye # We don't use istio/proxyv2 because it is not designed to be run separately (need to work around permission issue). @@ -31,7 +31,7 @@ rwildcard=$(foreach d,$(wildcard $(addsuffix *,$(1))),$(call rwildcard,$d/,$(2)) PROTO_FILES = $(call rwildcard,./,*.proto) GO_TARGETS = $(patsubst %.proto,%.pb.go,$(PROTO_FILES)) -MOUNT_GOMOD_CACHE = -v $(shell go env GOPATH):/go +MOUNT_GOMOD_CACHE ?= -v $(shell go env GOPATH):/go ifeq ($(IN_CI), true) # Mount go mod cache in the CI environment will cause 'Permission denied' error # when accessing files on host in later phase because the mounted directory will @@ -39,6 +39,7 @@ ifeq ($(IN_CI), true) # Run as low privilege user in the Docker doesn't # work because we also need root to create /.cache in the Docker. MOUNT_GOMOD_CACHE = + DOCKER_MIRROR = endif .PHONY: dev-tools