Skip to content

Commit 7548a22

Browse files
authored
chore(ci): add api7ee3 chart download step. (#110)
Signed-off-by: ashing <[email protected]>
1 parent 429e83f commit 7548a22

File tree

5 files changed

+34
-9
lines changed

5 files changed

+34
-9
lines changed

.github/workflows/conformance-test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
run: |
3333
go install sigs.k8s.io/[email protected]
3434
35+
- name: Install Helm
36+
run: |
37+
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
38+
chmod 700 get_helm.sh
39+
./get_helm.sh
40+
3541
conformance-test:
3642
needs:
3743
- prepare
@@ -81,6 +87,10 @@ jobs:
8187
run: |
8288
make kind-load-images
8389
90+
- name: Install API7EE3
91+
run: |
92+
make download-api7ee3-chart
93+
8494
- name: Run Conformance Test
8595
shell: bash
8696
env:

.github/workflows/e2e-test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
run: |
3333
go install sigs.k8s.io/[email protected]
3434
35+
- name: Install Helm
36+
run: |
37+
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
38+
chmod 700 get_helm.sh
39+
./get_helm.sh
40+
3541
e2e-test:
3642
needs:
3743
- prepare
@@ -72,6 +78,10 @@ jobs:
7278
run: |
7379
make install
7480
81+
- name: Download API7EE3 Chart
82+
run: |
83+
make download-api7ee3-chart
84+
7585
- name: Loading Docker Image to Kind Cluster
7686
run: |
7787
make kind-load-images

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ api7-ingress-controller-conformance-report.yaml
3434
*.mdx
3535
.cursor/
3636
.env
37+
38+
charts/api7ee3

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ e2e-test:
106106
@kind get kubeconfig --name $(KIND_NAME) > $$KUBECONFIG
107107
DASHBOARD_VERSION=$(DASHBOARD_VERSION) go test ./test/e2e/ -test.timeout=$(TEST_TIMEOUT) -v -ginkgo.v -ginkgo.focus="$(TEST_FOCUS)"
108108

109+
.PHONY: download-api7ee3-chart
110+
download-api7ee3-chart:
111+
@helm repo add api7 https://charts.api7.ai || true
112+
@helm repo update
113+
@helm pull api7/api7ee3 --destination "$(shell helm env HELM_REPOSITORY_CACHE)"
114+
@echo "Downloaded API7EE3 chart"
115+
109116
.PHONY: conformance-test
110117
conformance-test:
111118
DASHBOARD_VERSION=$(DASHBOARD_VERSION) go test -v ./test/conformance -tags=conformance

test/e2e/framework/dashboard.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
"golang.org/x/net/html"
1717
"helm.sh/helm/v3/pkg/action"
1818
"helm.sh/helm/v3/pkg/chart/loader"
19-
2019
"helm.sh/helm/v3/pkg/cli"
20+
2121
"helm.sh/helm/v3/pkg/kube"
2222
"k8s.io/apimachinery/pkg/util/yaml"
2323
)
@@ -273,20 +273,16 @@ func (f *Framework) deploy() {
273273
)
274274
f.GomegaT.Expect(err).ShouldNot(HaveOccurred(), "init helm action config")
275275

276-
chartPathOptions := action.ChartPathOptions{
277-
RepoURL: "https://charts.api7.ai",
278-
}
276+
install := action.NewInstall(actionConfig)
277+
install.Namespace = f.kubectlOpts.Namespace
278+
install.ReleaseName = "api7ee3"
279279

280-
chartPath, err := chartPathOptions.LocateChart("api7ee3", cli.New())
280+
chartPath, err := install.ChartPathOptions.LocateChart("api7/api7ee3", cli.New())
281281
f.GomegaT.Expect(err).ShouldNot(HaveOccurred(), "locate helm chart")
282282

283283
chart, err := loader.Load(chartPath)
284284
f.GomegaT.Expect(err).ShouldNot(HaveOccurred(), "load helm chart")
285285

286-
install := action.NewInstall(actionConfig)
287-
install.Namespace = f.kubectlOpts.Namespace
288-
install.ReleaseName = "api7ee3"
289-
290286
buf := bytes.NewBuffer(nil)
291287
_ = valuesTemplate.Execute(buf, map[string]any{
292288
"DB": _db,

0 commit comments

Comments
 (0)