From 257d6a26260f2117da9ae9d5f028d86dbe538c4d Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 11:11:09 +0800 Subject: [PATCH 01/13] feat: compatibility e2e Signed-off-by: Gaius --- .github/workflows/compatibility-e2e.yml | 42 +++++++------------ .../testdata/charts/compatibility-config.yaml | 31 -------------- 2 files changed, 14 insertions(+), 59 deletions(-) delete mode 100644 test/testdata/charts/compatibility-config.yaml diff --git a/.github/workflows/compatibility-e2e.yml b/.github/workflows/compatibility-e2e.yml index e4df129c3da..4255c057365 100644 --- a/.github/workflows/compatibility-e2e.yml +++ b/.github/workflows/compatibility-e2e.yml @@ -13,9 +13,9 @@ env: GOPROXY: https://goproxy.io,direct KIND_CONFIG_PATH: test/testdata/kind/config.yaml DRAGONFLY_E2E_TEST_MODE: compatibility - DRAGONFLY_DFDAEMON_IMAGE: dragonflyoss/dfdaemon:v0.4.0 + DRAGONFLY_DFDAEMON_IMAGE_TAG: v0.4.0 DRAGONFLY_CHARTS_PATH: deploy/helm-charts/charts/dragonfly - DRAGONFLY_CHARTS_CONFIG_PATH: test/testdata/charts/compatibility-config.yaml + DRAGONFLY_CHARTS_CONFIG_PATH: test/testdata/charts/config.yaml DRAGONFLY_FILE_SERVER_PATH: test/testdata/k8s/file-server.yaml jobs: @@ -34,6 +34,9 @@ jobs: e2e_tests: runs-on: ubuntu-latest + strategy: + matrix: + module: ["manager", "scheduler", "cdn", "dfdaemon"] needs: skip_check if: needs.skip_check.outputs.noop != 'true' @@ -60,35 +63,18 @@ jobs: version: ${{ env.KIND_VERSION }} config: ${{ env.KIND_CONFIG_PATH }} - - name: Build images - run: | - make docker-build-manager - make docker-build-cdn - make docker-build-scheduler - docker pull ${{ env.DRAGONFLY_DFDAEMON_IMAGE }} - - - name: Prepare kind environment - run: | - make kind-load-manager - make kind-load-cdn - make kind-load-scheduler - kind load docker-image ${{ env.DRAGONFLY_DFDAEMON_IMAGE }} - - - name: Setup dragonfly + - name: Run compatibility E2E test + env: + MODULE: ${{ matrix.module }} run: | - helm install --wait --timeout 10m --dependency-update --create-namespace --namespace dragonfly-system -f ${{ env.DRAGONFLY_CHARTS_CONFIG_PATH }} dragonfly ${{ env.DRAGONFLY_CHARTS_PATH }} + make docker-build + make kind-load + docker pull dragonflyoss${{ env.MODULE }}:${{ env.DRAGONFLY_DFDAEMON_IMAGE_TAG }} + kind load docker-image dragonflyoss${{ env.MODULE }}:${{ env.DRAGONFLY_DFDAEMON_IMAGE_TAG }} + helm install --wait --timeout 10m --dependency-update --create-namespace --namespace dragonfly-system --set ${{ env.MODULE }}.tag=${{ env.DRAGONFLY_DFDAEMON_IMAGE_TAG }} -f ${{ env.DRAGONFLY_CHARTS_CONFIG_PATH }} dragonfly ${{ env.DRAGONFLY_CHARTS_PATH }} kubectl apply -f ${{ env.DRAGONFLY_FILE_SERVER_PATH }} kubectl wait po file-server-0 --namespace dragonfly-e2e --for=condition=ready --timeout=10m - - - name: Run compatibility E2E test - run: make actions-e2e-test-coverage - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.txt - flags: compatibility-e2etests + make actions-e2e-test-coverage - name: Upload Logs uses: actions/upload-artifact@v2 diff --git a/test/testdata/charts/compatibility-config.yaml b/test/testdata/charts/compatibility-config.yaml deleted file mode 100644 index c704b1878f5..00000000000 --- a/test/testdata/charts/compatibility-config.yaml +++ /dev/null @@ -1,31 +0,0 @@ -scheduler: - image: d7yio/scheduler - tag: latest - -cdn: - image: d7yio/cdn - tag: latest - -dfdaemon: - image: dragonflyoss/dfdaemon - tag: v0.4.0 - config: - proxy: - defaultFilter: "Expires&Signature" - security: - insecure: true - tcpListen: - namespace: /run/dragonfly/net - listen: 0.0.0.0 - # if you want to change port, please update hostPort in $.Values.dfdaemon.hostPort - # port in configmap is generated from $.Values.dfdaemon.hostPort - # port: 65001 - registryMirror: - url: https://index.docker.io - proxies: - - regx: blobs/sha256.* - - regx: file-server - -manager: - image: d7yio/manager - tag: latest From e391652142e856d498a29cb9940544a634c83fbb Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 11:21:23 +0800 Subject: [PATCH 02/13] feat: image name Signed-off-by: Gaius --- .github/workflows/compatibility-e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compatibility-e2e.yml b/.github/workflows/compatibility-e2e.yml index 4255c057365..ed9b342ab21 100644 --- a/.github/workflows/compatibility-e2e.yml +++ b/.github/workflows/compatibility-e2e.yml @@ -69,12 +69,12 @@ jobs: run: | make docker-build make kind-load - docker pull dragonflyoss${{ env.MODULE }}:${{ env.DRAGONFLY_DFDAEMON_IMAGE_TAG }} + docker pull dragonflyoss/${{ env.MODULE }}:${{ env.DRAGONFLY_DFDAEMON_IMAGE_TAG }} kind load docker-image dragonflyoss${{ env.MODULE }}:${{ env.DRAGONFLY_DFDAEMON_IMAGE_TAG }} helm install --wait --timeout 10m --dependency-update --create-namespace --namespace dragonfly-system --set ${{ env.MODULE }}.tag=${{ env.DRAGONFLY_DFDAEMON_IMAGE_TAG }} -f ${{ env.DRAGONFLY_CHARTS_CONFIG_PATH }} dragonfly ${{ env.DRAGONFLY_CHARTS_PATH }} kubectl apply -f ${{ env.DRAGONFLY_FILE_SERVER_PATH }} kubectl wait po file-server-0 --namespace dragonfly-e2e --for=condition=ready --timeout=10m - make actions-e2e-test-coverage + make actions-e2e-test - name: Upload Logs uses: actions/upload-artifact@v2 From ef2befc28c44f8d39d4bf7240822015027dc2174 Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 11:44:45 +0800 Subject: [PATCH 03/13] feat: e2e Signed-off-by: Gaius --- .github/workflows/compatibility-e2e.yml | 35 ++++++++++++++++++------- test/e2e/e2e_test.go | 6 ++--- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/.github/workflows/compatibility-e2e.yml b/.github/workflows/compatibility-e2e.yml index ed9b342ab21..2ab06f086fa 100644 --- a/.github/workflows/compatibility-e2e.yml +++ b/.github/workflows/compatibility-e2e.yml @@ -12,8 +12,7 @@ env: CONTAINERD_VERSION: v1.5.2 GOPROXY: https://goproxy.io,direct KIND_CONFIG_PATH: test/testdata/kind/config.yaml - DRAGONFLY_E2E_TEST_MODE: compatibility - DRAGONFLY_DFDAEMON_IMAGE_TAG: v0.4.0 + DRAGONFLY_STABLE_IMAGE_TAG: v0.4.0 DRAGONFLY_CHARTS_PATH: deploy/helm-charts/charts/dragonfly DRAGONFLY_CHARTS_CONFIG_PATH: test/testdata/charts/config.yaml DRAGONFLY_FILE_SERVER_PATH: test/testdata/k8s/file-server.yaml @@ -32,7 +31,8 @@ jobs: paths_ignore: '["**.md", "**.png", "**.jpg", "**.svg"]' do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' - e2e_tests: + compatibility_e2e_tests: + name: compatibility e2e tests with ${{ matrix.module }} runs-on: ubuntu-latest strategy: matrix: @@ -63,18 +63,33 @@ jobs: version: ${{ env.KIND_VERSION }} config: ${{ env.KIND_CONFIG_PATH }} - - name: Run compatibility E2E test - env: - MODULE: ${{ matrix.module }} + - name: Build images run: | make docker-build + docker pull dragonflyoss/${{ matrix.module }}:${{ env.DRAGONFLY_STABLE_IMAGE_TAG }} + + - name: Prepare kind environment + run: | make kind-load - docker pull dragonflyoss/${{ env.MODULE }}:${{ env.DRAGONFLY_DFDAEMON_IMAGE_TAG }} - kind load docker-image dragonflyoss${{ env.MODULE }}:${{ env.DRAGONFLY_DFDAEMON_IMAGE_TAG }} - helm install --wait --timeout 10m --dependency-update --create-namespace --namespace dragonfly-system --set ${{ env.MODULE }}.tag=${{ env.DRAGONFLY_DFDAEMON_IMAGE_TAG }} -f ${{ env.DRAGONFLY_CHARTS_CONFIG_PATH }} dragonfly ${{ env.DRAGONFLY_CHARTS_PATH }} + kind load docker-image dragonflyoss/${{ matrix.module }}:${{ env.DRAGONFLY_STABLE_IMAGE_TAG }} + + - name: Setup dragonfly + run: | + helm install --wait --timeout 10m --dependency-update --create-namespace --namespace dragonfly-system --set ${{ matrix.module }}.tag=${{ env.DRAGONFLY_STABLE_IMAGE_TAG }} -f ${{ env.DRAGONFLY_CHARTS_CONFIG_PATH }} dragonfly ${{ env.DRAGONFLY_CHARTS_PATH }} kubectl apply -f ${{ env.DRAGONFLY_FILE_SERVER_PATH }} kubectl wait po file-server-0 --namespace dragonfly-e2e --for=condition=ready --timeout=10m - make actions-e2e-test + + - name: Run E2E test + env: + DRAGONFLY_COMPATIBILITY_E2E_TEST_MODE: ${{ matrix.module }} + run: make actions-e2e-test-coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.txt + flags: ${{ matrix }}-compatibility-e2etests - name: Upload Logs uses: actions/upload-artifact@v2 diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 0759da2ffaf..3fae352a34e 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -36,7 +36,7 @@ const ( ) const ( - compatibilityTestMode = "compatibility" + dfdaemonCompatibilityTestMode = "dfdaemon" ) var _ = BeforeSuite(func() { @@ -57,8 +57,8 @@ var _ = BeforeSuite(func() { dfgetGitCommit := strings.Fields(string(rawDfgetVersion))[7] fmt.Printf("dfget merge commit: %s\n", dfgetGitCommit) - mode := os.Getenv("DRAGONFLY_E2E_TEST_MODE") - if mode == compatibilityTestMode { + mode := os.Getenv("DRAGONFLY_COMPATIBILITY_E2E_TEST_MODE") + if mode == dfdaemonCompatibilityTestMode { Expect(gitCommit).NotTo(Equal(dfgetGitCommit)) return } From a4165d19dc6dc8c66df2bd352fe8f5300edebe16 Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 11:52:16 +0800 Subject: [PATCH 04/13] feat: image Signed-off-by: Gaius --- .github/workflows/compatibility-e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compatibility-e2e.yml b/.github/workflows/compatibility-e2e.yml index 2ab06f086fa..efa7305d5d2 100644 --- a/.github/workflows/compatibility-e2e.yml +++ b/.github/workflows/compatibility-e2e.yml @@ -32,7 +32,7 @@ jobs: do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' compatibility_e2e_tests: - name: compatibility e2e tests with ${{ matrix.module }} + name: ${{ matrix.module }} runs-on: ubuntu-latest strategy: matrix: @@ -75,7 +75,7 @@ jobs: - name: Setup dragonfly run: | - helm install --wait --timeout 10m --dependency-update --create-namespace --namespace dragonfly-system --set ${{ matrix.module }}.tag=${{ env.DRAGONFLY_STABLE_IMAGE_TAG }} -f ${{ env.DRAGONFLY_CHARTS_CONFIG_PATH }} dragonfly ${{ env.DRAGONFLY_CHARTS_PATH }} + helm install --wait --timeout 10m --dependency-update --create-namespace --namespace dragonfly-system --set ${{ matrix.module }}.tag=${{ env.DRAGONFLY_STABLE_IMAGE_TAG }} --set ${{ matrix.module }}.image=dragonflyoss/${{ matrix.module }} -f ${{ env.DRAGONFLY_CHARTS_CONFIG_PATH }} dragonfly ${{ env.DRAGONFLY_CHARTS_PATH }} kubectl apply -f ${{ env.DRAGONFLY_FILE_SERVER_PATH }} kubectl wait po file-server-0 --namespace dragonfly-e2e --for=condition=ready --timeout=10m From c399a7d3cab897e29994576bff8880a02b27883a Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 12:22:17 +0800 Subject: [PATCH 05/13] feat: image tag Signed-off-by: Gaius --- .github/workflows/compatibility-e2e.yml | 4 ++-- test/e2e/e2e_test.go | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/compatibility-e2e.yml b/.github/workflows/compatibility-e2e.yml index efa7305d5d2..23abc7540d6 100644 --- a/.github/workflows/compatibility-e2e.yml +++ b/.github/workflows/compatibility-e2e.yml @@ -32,7 +32,7 @@ jobs: do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' compatibility_e2e_tests: - name: ${{ matrix.module }} + name: e2e_tests_with_${{ matrix.module }} runs-on: ubuntu-latest strategy: matrix: @@ -79,7 +79,7 @@ jobs: kubectl apply -f ${{ env.DRAGONFLY_FILE_SERVER_PATH }} kubectl wait po file-server-0 --namespace dragonfly-e2e --for=condition=ready --timeout=10m - - name: Run E2E test + - name: Run Compatibility E2E test env: DRAGONFLY_COMPATIBILITY_E2E_TEST_MODE: ${{ matrix.module }} run: make actions-e2e-test-coverage diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 3fae352a34e..334f8605433 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -37,9 +37,19 @@ const ( const ( dfdaemonCompatibilityTestMode = "dfdaemon" + stableImageTag = "v0.4.0" ) var _ = BeforeSuite(func() { + mode := os.Getenv("DRAGONFLY_COMPATIBILITY_E2E_TEST_MODE") + if mode != "" { + rawImage, err := e2eutil.KubeCtlCommand("-n", dragonflyNamespace, "get", "pod", "-l", "component=dfdaemon", + "-o", "jsonpath='{range .items[*]}{.spec.containers[0].image}{end}'").CombinedOutput() + Expect(err).NotTo(HaveOccurred()) + fmt.Printf("compatibility module image name: %s\n", string(rawImage)) + Expect(fmt.Sprintf("dragonflyoss/%s:%s", mode, stableImageTag)).To(Equal(string(rawImage))) + } + rawGitCommit, err := e2eutil.GitCommand("rev-parse", "--short", "HEAD").CombinedOutput() Expect(err).NotTo(HaveOccurred()) gitCommit := strings.Fields(string(rawGitCommit))[0] @@ -57,13 +67,12 @@ var _ = BeforeSuite(func() { dfgetGitCommit := strings.Fields(string(rawDfgetVersion))[7] fmt.Printf("dfget merge commit: %s\n", dfgetGitCommit) - mode := os.Getenv("DRAGONFLY_COMPATIBILITY_E2E_TEST_MODE") if mode == dfdaemonCompatibilityTestMode { Expect(gitCommit).NotTo(Equal(dfgetGitCommit)) return } - Expect(gitCommit).To(Equal(dfgetGitCommit)) + }) var _ = AfterSuite(func() { From e82c91691c1ba76bac3123928798f10d656fa4b1 Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 12:25:35 +0800 Subject: [PATCH 06/13] feat: component Signed-off-by: Gaius --- test/e2e/e2e_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 334f8605433..db02b06b70d 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -43,10 +43,10 @@ const ( var _ = BeforeSuite(func() { mode := os.Getenv("DRAGONFLY_COMPATIBILITY_E2E_TEST_MODE") if mode != "" { - rawImage, err := e2eutil.KubeCtlCommand("-n", dragonflyNamespace, "get", "pod", "-l", "component=dfdaemon", + rawImage, err := e2eutil.KubeCtlCommand("-n", dragonflyNamespace, "get", "pod", "-l", fmt.Sprintf("component=%s", mode), "-o", "jsonpath='{range .items[*]}{.spec.containers[0].image}{end}'").CombinedOutput() Expect(err).NotTo(HaveOccurred()) - fmt.Printf("compatibility module image name: %s\n", string(rawImage)) + fmt.Printf("special image name: %s\n", string(rawImage)) Expect(fmt.Sprintf("dragonflyoss/%s:%s", mode, stableImageTag)).To(Equal(string(rawImage))) } @@ -71,8 +71,8 @@ var _ = BeforeSuite(func() { Expect(gitCommit).NotTo(Equal(dfgetGitCommit)) return } - Expect(gitCommit).To(Equal(dfgetGitCommit)) + Expect(gitCommit).To(Equal(dfgetGitCommit)) }) var _ = AfterSuite(func() { From caa5e90ffd52f17cce03412e91ff2b944821ab10 Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 12:28:43 +0800 Subject: [PATCH 07/13] feat: stable image tag Signed-off-by: Gaius --- test/e2e/e2e_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index db02b06b70d..c44e0835da1 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -37,7 +37,6 @@ const ( const ( dfdaemonCompatibilityTestMode = "dfdaemon" - stableImageTag = "v0.4.0" ) var _ = BeforeSuite(func() { @@ -47,6 +46,8 @@ var _ = BeforeSuite(func() { "-o", "jsonpath='{range .items[*]}{.spec.containers[0].image}{end}'").CombinedOutput() Expect(err).NotTo(HaveOccurred()) fmt.Printf("special image name: %s\n", string(rawImage)) + + stableImageTag := os.Getenv("DRAGONFLY_STABLE_IMAGE_TAG") Expect(fmt.Sprintf("dragonflyoss/%s:%s", mode, stableImageTag)).To(Equal(string(rawImage))) } From 61f798f43bad32013092502b2b4934d47c5f224f Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 12:32:10 +0800 Subject: [PATCH 08/13] feat: image Signed-off-by: Gaius --- test/e2e/e2e_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index c44e0835da1..41826e8c8cd 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -44,11 +44,12 @@ var _ = BeforeSuite(func() { if mode != "" { rawImage, err := e2eutil.KubeCtlCommand("-n", dragonflyNamespace, "get", "pod", "-l", fmt.Sprintf("component=%s", mode), "-o", "jsonpath='{range .items[*]}{.spec.containers[0].image}{end}'").CombinedOutput() + image := strings.Trim(string(rawImage), "'") Expect(err).NotTo(HaveOccurred()) - fmt.Printf("special image name: %s\n", string(rawImage)) + fmt.Printf("special image name: %s\n", image) stableImageTag := os.Getenv("DRAGONFLY_STABLE_IMAGE_TAG") - Expect(fmt.Sprintf("dragonflyoss/%s:%s", mode, stableImageTag)).To(Equal(string(rawImage))) + Expect(fmt.Sprintf("dragonflyoss/%s:%s", mode, stableImageTag)).To(Equal(image)) } rawGitCommit, err := e2eutil.GitCommand("rev-parse", "--short", "HEAD").CombinedOutput() From cd7bc62ef6b9339c91b16772659979bd479fa4d8 Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 12:36:05 +0800 Subject: [PATCH 09/13] feat: helm-charts Signed-off-by: Gaius --- deploy/helm-charts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/helm-charts b/deploy/helm-charts index b585828c390..747c77f41b1 160000 --- a/deploy/helm-charts +++ b/deploy/helm-charts @@ -1 +1 @@ -Subproject commit b585828c390fe0d9e341005bb9a858c6c21b35cc +Subproject commit 747c77f41b1e6f944891a117cd3045f8c9936fa4 From 8c4cddbb4b2f87a3989d6c107c55e8b04a208b6c Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 13:21:33 +0800 Subject: [PATCH 10/13] feat: image Signed-off-by: Gaius --- test/e2e/e2e_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 41826e8c8cd..bdf62bdb325 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -42,9 +42,9 @@ const ( var _ = BeforeSuite(func() { mode := os.Getenv("DRAGONFLY_COMPATIBILITY_E2E_TEST_MODE") if mode != "" { - rawImage, err := e2eutil.KubeCtlCommand("-n", dragonflyNamespace, "get", "pod", "-l", fmt.Sprintf("component=%s", mode), - "-o", "jsonpath='{range .items[*]}{.spec.containers[0].image}{end}'").CombinedOutput() - image := strings.Trim(string(rawImage), "'") + rawImages, err := e2eutil.KubeCtlCommand("-n", dragonflyNamespace, "get", "pod", "-l", fmt.Sprintf("component=%s", mode), + "-o", "jsonpath='{range .items[0]}{.spec.containers[0].image}{end}'").CombinedOutput() + image := strings.Trim(string(rawImages), "'") Expect(err).NotTo(HaveOccurred()) fmt.Printf("special image name: %s\n", image) From 87607fb1a8f031da7ce64f6fdb3f33fa0b20ca2e Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 13:45:51 +0800 Subject: [PATCH 11/13] feat: logger Signed-off-by: Gaius --- test/e2e/e2e_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index bdf62bdb325..f9fbfb9fb40 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -85,6 +85,12 @@ var _ = AfterSuite(func() { Expect(strings.HasPrefix(podName, "dragonfly-dfdaemon-")).Should(BeTrue()) e2eutil.KubeCtlCopyCommand(dragonflyNamespace, podName, "/var/log/dragonfly/daemon/core.log", "/tmp/artifact/daemon.log").CombinedOutput() + e2eutil.KubeCtlCopyCommand(dragonflyNamespace, "dragonlfy-manager-0", "/var/log/dragonfly/manager/core.log", "/tmp/artifact/manager-0.log").CombinedOutput() + e2eutil.KubeCtlCopyCommand(dragonflyNamespace, "dragonlfy-manager-0", "/var/log/dragonfly/manager/gin.log", "/tmp/artifact/manager-gin-0.log").CombinedOutput() + e2eutil.KubeCtlCopyCommand(dragonflyNamespace, "dragonlfy-manager-1", "/var/log/dragonfly/manager/core.log", "/tmp/artifact/manager-1.log").CombinedOutput() + e2eutil.KubeCtlCopyCommand(dragonflyNamespace, "dragonlfy-manager-1", "/var/log/dragonfly/manager/gin.log", "/tmp/artifact/manager-gin-1.log").CombinedOutput() + e2eutil.KubeCtlCopyCommand(dragonflyNamespace, "dragonlfy-manager-2", "/var/log/dragonfly/manager/core.log", "/tmp/artifact/manager-2.log").CombinedOutput() + e2eutil.KubeCtlCopyCommand(dragonflyNamespace, "dragonlfy-manager-2", "/var/log/dragonfly/manager/gin.log", "/tmp/artifact/manager-gin-2.log").CombinedOutput() e2eutil.KubeCtlCopyCommand(dragonflyNamespace, "dragonfly-cdn-0", "/var/log/dragonfly/cdn/core.log", "/tmp/artifact/cdn-0.log").CombinedOutput() e2eutil.KubeCtlCopyCommand(dragonflyNamespace, "dragonfly-cdn-1", "/var/log/dragonfly/cdn/core.log", "/tmp/artifact/cdn-1.log").CombinedOutput() e2eutil.KubeCtlCopyCommand(dragonflyNamespace, "dragonfly-cdn-2", "/var/log/dragonfly/cdn/core.log", "/tmp/artifact/cdn-2.log").CombinedOutput() From c552f3ee6329fc487878efbc4cb98f2d9e4a2df0 Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 14:01:40 +0800 Subject: [PATCH 12/13] feat: upload Signed-off-by: Gaius --- .github/workflows/compatibility-e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compatibility-e2e.yml b/.github/workflows/compatibility-e2e.yml index 23abc7540d6..e22b72bcf58 100644 --- a/.github/workflows/compatibility-e2e.yml +++ b/.github/workflows/compatibility-e2e.yml @@ -95,5 +95,5 @@ jobs: uses: actions/upload-artifact@v2 if: failure() with: - name: dragonfly-logs + name: dragonfly-compatibility-${{ matrix.module }}-logs path: /tmp/artifact/ From eb8c87bd41e66bef63f4352072ddf0f715cdaaf9 Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 3 Sep 2021 14:04:14 +0800 Subject: [PATCH 13/13] feat: upload log Signed-off-by: Gaius --- .github/workflows/compatibility-e2e.yml | 2 +- .github/workflows/e2e.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compatibility-e2e.yml b/.github/workflows/compatibility-e2e.yml index e22b72bcf58..3f37ebec880 100644 --- a/.github/workflows/compatibility-e2e.yml +++ b/.github/workflows/compatibility-e2e.yml @@ -95,5 +95,5 @@ jobs: uses: actions/upload-artifact@v2 if: failure() with: - name: dragonfly-compatibility-${{ matrix.module }}-logs + name: ${{ matrix.module }}-compatibility-e2e-tests-logs path: /tmp/artifact/ diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 1c184f75a7f..81d95d87859 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -84,5 +84,5 @@ jobs: uses: actions/upload-artifact@v2 if: failure() with: - name: dragonfly-logs + name: e2e-tests-logs path: /tmp/artifact/