You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2021/08/20 06:28:06 UTC

[skywalking-infra-e2e] 01/01: Use native executable by default and move Docker GHA to another path

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch native-mode
in repository https://gitbox.apache.org/repos/asf/skywalking-infra-e2e.git

commit 13a8d241591a35bc401d20ab5f05bc6073d77565
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Fri Aug 20 13:57:59 2021 +0800

    Use native executable by default and move Docker GHA to another path
---
 Dockerfile                        | 18 ------------------
 action.yaml                       | 11 +++++------
 action.yaml => docker/action.yaml |  5 +++--
 3 files changed, 8 insertions(+), 26 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 03f2af5..26cc33c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -16,23 +16,6 @@
 # under the License.
 #
 
-FROM golang:1.16 AS swctl
-
-ARG COMMIT_HASH=master
-ARG CLI_CODE=${COMMIT_HASH}.tar.gz
-ARG CLI_CODE_URL=https://github.com/apache/skywalking-cli/archive/${CLI_CODE}
-
-ENV CGO_ENABLED=0
-ENV GO111MODULE=on
-
-WORKDIR /cli
-
-ADD ${CLI_CODE_URL} .
-RUN tar -xf ${CLI_CODE} --strip 1
-RUN rm ${CLI_CODE}
-
-RUN VERSION=ci make linux && mv bin/swctl-ci-linux-amd64 /usr/local/bin/swctl
-
 FROM golang:1.16 AS build
 
 WORKDIR /e2e
@@ -46,7 +29,6 @@ FROM golang:1.16 AS bin
 RUN apt update; \
     apt install -y docker-compose
 
-COPY --from=swctl /usr/local/bin/swctl /usr/local/bin/swctl
 COPY --from=build /e2e/bin/linux/e2e /usr/local/bin/e2e
 
 # Add common tools, copy from prebuilt Docker image whenever possible.
diff --git a/action.yaml b/action.yaml
index 0ced170..681b8b8 100644
--- a/action.yaml
+++ b/action.yaml
@@ -26,10 +26,9 @@ runs:
   using: "composite"
   steps:
     - shell: bash
-      run: make -C $GITHUB_ACTION_PATH docker
-    - shell: bash
       run: |
-        docker run -v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE \
-                   -v /var/run/docker.sock:/var/run/docker.sock \
-                   -w $GITHUB_WORKSPACE \
-                   docker.io/apache/e2e:latest run -c "${{ inputs.e2e-file }}"
+        make -C $GITHUB_ACTION_PATH docker
+        docker run -v $(pwd):/tmp -w /tmp --entrypoint=sh docker.io/apache/e2e:latest -c "cp /usr/local/bin/e2e /tmp/e2e"
+        install ./e2e /usr/local/bin
+    - shell: bash
+      run: e2e run -c "${{ inputs.e2e-file }}"
diff --git a/action.yaml b/docker/action.yaml
similarity index 91%
copy from action.yaml
copy to docker/action.yaml
index 0ced170..4e6ced4 100644
--- a/action.yaml
+++ b/docker/action.yaml
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-name: SkyWalking Infra E2E
+name: SkyWalking Infra E2E Dockerized
 description: End-to-End Tesing framework that help to set up, verify E2E tests.
 author: Apache SkyWalking
 inputs:
@@ -29,7 +29,8 @@ runs:
       run: make -C $GITHUB_ACTION_PATH docker
     - shell: bash
       run: |
+        printenv > env.list
         docker run -v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE \
                    -v /var/run/docker.sock:/var/run/docker.sock \
-                   -w $GITHUB_WORKSPACE \
+                   -w $GITHUB_WORKSPACE --env-file env.list\
                    docker.io/apache/e2e:latest run -c "${{ inputs.e2e-file }}"