Skip to content

Commit 65b8f1d

Browse files
Foo BarCopilot
andcommitted
revert: remove unnecessary CI/CD changes unrelated to webhook validation
Revert CI/deployment changes that are not needed for the webhook ADC validation feature and work fine on master: - Revert docker login steps back to docker/login-action@v3 in all workflow files (apisix-conformance-test, apisix-e2e-test, conformance-test, e2e-test, e2e-test-k8s) - Revert e2e-test-k8s.yml kind cluster setup to original approach - Revert e2e-test-k8s.yml postgres image mirror preloading - Revert spell-checker.yml to use wget-based misspell install - Revert Makefile pull-infra-images to simple docker pull (keep jmalloc/echo-server removed since it is now built locally) - Revert Makefile ADC binary download to simple curl | tar Retained changes required for the feature: - build-e2e-echo-server-image target - kind-load-images dependency on build-e2e-echo-server-image Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f9905c1 commit 65b8f1d

7 files changed

Lines changed: 53 additions & 109 deletions

File tree

.github/workflows/apisix-conformance-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ jobs:
5858
go install sigs.k8s.io/kind@v0.23.0
5959
6060
- name: Login to Registry
61-
run: |
62-
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login \
63-
"${{ secrets.DOCKER_REGISTRY }}" \
64-
--username "${{ secrets.DOCKER_USERNAME }}" \
65-
--password-stdin
61+
uses: docker/login-action@v3
62+
with:
63+
registry: ${{ secrets.DOCKER_REGISTRY }}
64+
username: ${{ secrets.DOCKER_USERNAME }}
65+
password: ${{ secrets.DOCKER_PASSWORD }}
6666

6767
- name: Build images
6868
env:

.github/workflows/apisix-e2e-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ jobs:
5757
go-version: "1.24"
5858

5959
- name: Login to Registry
60-
run: |
61-
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login \
62-
"${{ secrets.DOCKER_REGISTRY }}" \
63-
--username "${{ secrets.DOCKER_USERNAME }}" \
64-
--password-stdin
60+
uses: docker/login-action@v3
61+
with:
62+
registry: ${{ secrets.DOCKER_REGISTRY }}
63+
username: ${{ secrets.DOCKER_USERNAME }}
64+
password: ${{ secrets.DOCKER_PASSWORD }}
6565

6666
- name: Setup Node.js
6767
uses: actions/setup-node@v3

.github/workflows/conformance-test.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@ jobs:
5757
./get_helm.sh
5858
5959
- name: Login to Registry
60-
run: |
61-
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login \
62-
"${{ secrets.DOCKER_REGISTRY }}" \
63-
--username "${{ secrets.DOCKER_USERNAME }}" \
64-
--password-stdin
60+
uses: docker/login-action@v3
61+
with:
62+
registry: ${{ secrets.DOCKER_REGISTRY }}
63+
username: ${{ secrets.DOCKER_USERNAME }}
64+
password: ${{ secrets.DOCKER_PASSWORD }}
6565

6666
- name: Login to Private Registry
67-
run: |
68-
echo "${{ secrets.PRIVATE_DOCKER_PASSWORD }}" | docker login \
69-
hkccr.ccs.tencentyun.com \
70-
--username "${{ secrets.PRIVATE_DOCKER_USERNAME }}" \
71-
--password-stdin
67+
uses: docker/login-action@v3
68+
with:
69+
registry: hkccr.ccs.tencentyun.com
70+
username: ${{ secrets.PRIVATE_DOCKER_USERNAME }}
71+
password: ${{ secrets.PRIVATE_DOCKER_PASSWORD }}
7272

7373
- name: Build images
7474
env:

.github/workflows/e2e-test-k8s.yml

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -59,32 +59,23 @@ jobs:
5959
./get_helm.sh
6060
6161
- name: Login to Private Registry
62-
run: |
63-
echo "${{ secrets.PRIVATE_DOCKER_PASSWORD }}" | docker login \
64-
hkccr.ccs.tencentyun.com \
65-
--username "${{ secrets.PRIVATE_DOCKER_USERNAME }}" \
66-
--password-stdin
62+
uses: docker/login-action@v3
63+
with:
64+
registry: hkccr.ccs.tencentyun.com
65+
username: ${{ secrets.PRIVATE_DOCKER_USERNAME }}
66+
password: ${{ secrets.PRIVATE_DOCKER_PASSWORD }}
6767

6868
- name: Launch Kind Cluster
6969
env:
7070
KIND_NODE_IMAGE: kindest/node:v1.18.15
7171
run: |
72-
make kind-down
7372
make kind-up
74-
mkdir -p "${HOME}/.kube"
75-
kind get kubeconfig --name apisix-ingress-cluster --internal > "${HOME}/.kube/config"
76-
kubectl config use-context kind-apisix-ingress-cluster
77-
for attempt in {1..30}; do
78-
if kubectl cluster-info >/dev/null 2>&1; then
79-
break
80-
fi
81-
if [ "${attempt}" -eq 30 ]; then
82-
echo "kind apiserver did not become reachable in time" >&2
83-
exit 1
84-
fi
85-
sleep 2
86-
done
87-
kubectl wait --for=condition=Ready nodes --all --timeout=120s
73+
KIND_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' apisix-ingress-cluster-control-plane)
74+
echo $KIND_NODE_IP
75+
76+
kubectl config get-clusters
77+
kubectl config set-cluster kind-apisix-ingress-cluster --server=https://$KIND_NODE_IP:6443
78+
kubectl wait --for=condition=Ready nodes --all
8879
8980
- name: Build images
9081
env:
@@ -107,23 +98,6 @@ jobs:
10798
- name: Loading Docker Image to Kind Cluster
10899
run: |
109100
make kind-load-images
110-
loaded_postgres_image=false
111-
for image in \
112-
swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/bitnamilegacy/postgresql:15.4.0-debian-11-r45 \
113-
docker.aityp.com/bitnamilegacy/postgresql:15.4.0-debian-11-r45 \
114-
bitnamilegacy/postgresql:15.4.0-debian-11-r45 \
115-
docker.m.daocloud.io/bitnamilegacy/postgresql:15.4.0-debian-11-r45; do
116-
if docker pull "${image}"; then
117-
docker tag "${image}" docker.io/bitnamilegacy/postgresql:15.4.0-debian-11-r45
118-
kind load docker-image docker.io/bitnamilegacy/postgresql:15.4.0-debian-11-r45 --name apisix-ingress-cluster
119-
loaded_postgres_image=true
120-
break
121-
fi
122-
done
123-
if [ "${loaded_postgres_image}" != "true" ]; then
124-
echo "failed to preload postgres image for kind" >&2
125-
exit 1
126-
fi
127101
128102
- name: Extract adc binary
129103
if: ${{ env.ADC_VERSION == 'dev' }}
@@ -145,8 +119,5 @@ jobs:
145119
TEST_LABEL: ${{ matrix.cases_subset }}
146120
INGRESS_VERSION: v1beta1
147121
TEST_ENV: CI
148-
POSTGRESQL_IMAGE_REGISTRY: docker.io
149-
POSTGRESQL_IMAGE_REPOSITORY: bitnamilegacy/postgresql
150-
POSTGRESQL_IMAGE_TAG: 15.4.0-debian-11-r45
151122
run: |
152123
make e2e-test

.github/workflows/e2e-test.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,18 @@ jobs:
6262
chmod 700 get_helm.sh
6363
./get_helm.sh
6464
- name: Login to Registry
65-
run: |
66-
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login \
67-
"${{ secrets.DOCKER_REGISTRY }}" \
68-
--username "${{ secrets.DOCKER_USERNAME }}" \
69-
--password-stdin
65+
uses: docker/login-action@v3
66+
with:
67+
registry: ${{ secrets.DOCKER_REGISTRY }}
68+
username: ${{ secrets.DOCKER_USERNAME }}
69+
password: ${{ secrets.DOCKER_PASSWORD }}
7070

7171
- name: Login to Private Registry
72-
run: |
73-
echo "${{ secrets.PRIVATE_DOCKER_PASSWORD }}" | docker login \
74-
hkccr.ccs.tencentyun.com \
75-
--username "${{ secrets.PRIVATE_DOCKER_USERNAME }}" \
76-
--password-stdin
72+
uses: docker/login-action@v3
73+
with:
74+
registry: hkccr.ccs.tencentyun.com
75+
username: ${{ secrets.PRIVATE_DOCKER_USERNAME }}
76+
password: ${{ secrets.PRIVATE_DOCKER_PASSWORD }}
7777

7878
- name: Build images
7979
env:

.github/workflows/spell-checker.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,10 @@ jobs:
3131
steps:
3232
- name: Check out code.
3333
uses: actions/checkout@v4
34-
- name: Set up Go
35-
uses: actions/setup-go@v5
36-
with:
37-
go-version-file: go.mod
3834
- name: Install
3935
run: |
40-
go install github.com/client9/misspell/cmd/misspell@v0.3.4
36+
wget -O - -q https://git.io/misspell | sh -s -- -b .
4137
- name: Misspell
4238
run: |
43-
find . -name "*.go" -type f | xargs "$(go env GOPATH)/bin/misspell" -i mosquitto -error
44-
find docs -type f | xargs "$(go env GOPATH)/bin/misspell" -error
39+
find . -name "*.go" -type f | xargs ./misspell -i mosquitto -error
40+
find docs -type f | xargs ./misspell -error

Makefile

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -229,32 +229,13 @@ build-e2e-echo-server-image:
229229

230230
.PHONY: pull-infra-images
231231
pull-infra-images:
232-
@retry_pull() { \
233-
source="$$1"; \
234-
target="$$2"; \
235-
for attempt in 1 2 3; do \
236-
if docker pull "$$source"; then \
237-
if [ "$$source" != "$$target" ]; then \
238-
docker tag "$$source" "$$target"; \
239-
fi; \
240-
return 0; \
241-
fi; \
242-
if [ $$attempt -eq 3 ]; then \
243-
echo "failed to pull $$source after $$attempt attempts" >&2; \
244-
exit 1; \
245-
fi; \
246-
echo "retrying docker pull for $$source (attempt $$((attempt + 1))/3)..." >&2; \
247-
sleep 5; \
248-
done; \
249-
}; \
250-
retry_pull "hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev" "hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev"; \
251-
retry_pull "hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION)" "hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION)"; \
252-
retry_pull "hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION)" "hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION)"; \
253-
dockerhub_proxy="$${DOCKERHUB_PROXY:-docker.m.daocloud.io}"; \
254-
retry_pull "$$dockerhub_proxy/kennethreitz/httpbin:latest" "kennethreitz/httpbin:latest"; \
255-
retry_pull "ghcr.io/api7/adc:dev" "ghcr.io/api7/adc:dev"; \
256-
retry_pull "$$dockerhub_proxy/apache/apisix:dev" "apache/apisix:dev"; \
257-
retry_pull "$$dockerhub_proxy/openresty/openresty:1.27.1.2-4-bullseye-fat" "openresty/openresty:1.27.1.2-4-bullseye-fat"
232+
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev
233+
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION)
234+
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION)
235+
@docker pull kennethreitz/httpbin:latest
236+
@docker pull ghcr.io/api7/adc:dev
237+
@docker pull apache/apisix:dev
238+
@docker pull openresty/openresty:1.27.1.2-4-bullseye-fat
258239

259240
##@ Build
260241

@@ -421,12 +402,8 @@ $(ADC_BIN):
421402
ifeq ($(ADC_VERSION),dev)
422403
@echo "ADC_VERSION=dev, skip download"
423404
else
424-
tmp_archive=$$(mktemp); \
425-
trap 'rm -f "$$tmp_archive"' EXIT; \
426-
curl --retry 5 --retry-delay 2 --retry-connrefused -sSfL \
427-
-o "$$tmp_archive" \
428-
https://github.com/api7/adc/releases/download/v${ADC_VERSION}/adc_${ADC_VERSION}_${GOOS}_${GOARCH}.tar.gz; \
429-
tar -xzf "$$tmp_archive" -C $(LOCALBIN)
405+
curl -sSfL https://github.com/api7/adc/releases/download/v${ADC_VERSION}/adc_${ADC_VERSION}_${GOOS}_${GOARCH}.tar.gz \
406+
| tar -xz -C $(LOCALBIN)
430407
endif
431408

432409
gofmt: ## Apply go fmt

0 commit comments

Comments
 (0)