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 bbea1845b4fa37e83791c145aecbb216a4cd6a0b Author: kezhenxu94 <[email protected]> AuthorDate: Fri Aug 20 13:57:59 2021 +0800 Use native executable instead of Docker container in GHA --- Dockerfile | 26 -------------------------- action.yaml | 11 +++++------ 2 files changed, 5 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index 03f2af5..fd5d0c2 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 @@ -43,17 +26,8 @@ RUN make linux 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. -COPY --from=stedolan/jq /usr/local/bin/jq /usr/local/bin/jq -COPY --from=mikefarah/yq:4 /usr/bin/yq /usr/local/bin/yq -COPY --from=docker /usr/local/bin/docker /usr/local/bin/docker - WORKDIR /github/workspace/ ENTRYPOINT ["e2e"] diff --git a/action.yaml b/action.yaml index 0ced170..5fc5317 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 + - shell: bash + run: e2e run -c "${{ inputs.e2e-file }}"
