Skip to content

Commit

Permalink
ci: don't use unstable mirror (#832)
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <[email protected]>
  • Loading branch information
spacewander authored Jan 7, 2025
1 parent a88dbcd commit 3a94a37
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion api/tests/integration/testdata/services/grpc/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -58,12 +58,13 @@ 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
# have files which is created by the root user in Docker.
# 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
4 changes: 2 additions & 2 deletions controller/tests/testdata/services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion e2e/base/nacos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions examples/dev_your_plugin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -31,14 +31,15 @@ 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
# have files which is created by the root user in Docker.
# 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
Expand Down

0 comments on commit 3a94a37

Please sign in to comment.