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/12 13:04:08 UTC

[skywalking-infra-e2e] branch docker updated (ee407f9 -> a9d02d1)

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

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


 discard ee407f9  Add Dockerfile and use Docker image in GHA
     new a9d02d1  Add Dockerfile and use Docker image in GHA

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (ee407f9)
            \
             N -- N -- N   refs/heads/docker (a9d02d1)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Makefile    | 8 ++++++--
 action.yaml | 3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)

[skywalking-infra-e2e] 01/01: Add Dockerfile and use Docker image in GHA

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a9d02d10b50f09f528ce9daa51c5c006c217793f
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Thu Aug 12 18:44:49 2021 +0800

    Add Dockerfile and use Docker image in GHA
---
 Dockerfile  | 37 +++++++++++++++++++++++++++++++++++++
 Makefile    | 13 +++++++++++--
 action.yaml |  8 ++++++--
 3 files changed, 54 insertions(+), 4 deletions(-)

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..f83caad
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,37 @@
+# Licensed to Apache Software Foundation (ASF) under one or more contributor
+# license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright
+# ownership. Apache Software Foundation (ASF) licenses this file to you under
+# the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+FROM golang:1.16 AS build
+
+WORKDIR /e2e
+
+COPY . .
+
+RUN make linux
+
+FROM golang:1.16 AS bin
+
+RUN apt update; \
+    apt install -y docker docker-compose jq
+
+COPY --from=build /e2e/bin/linux/e2e /bin/e2e
+COPY --from=mikefarah/yq /usr/bin/yq /usr/bin/yq
+
+WORKDIR /github/workspace/
+
+ENTRYPOINT ["/bin/e2e"]
diff --git a/Makefile b/Makefile
index e0f675b..f351169 100644
--- a/Makefile
+++ b/Makefile
@@ -16,11 +16,12 @@
 # under the License.
 #
 
-PROJECT = e2e
-VERSION ?= latest
+PROJECT := e2e
+VERSION ?= $(shell git rev-parse --short HEAD)
 OUT_DIR = bin
 ARCH := $(shell uname)
 OSNAME := $(if $(findstring Darwin,$(ARCH)),darwin,linux)
+HUB ?= docker.io/apache
 
 GO := GO111MODULE=on go
 GO_PATH = $(shell $(GO) env GOPATH)
@@ -70,6 +71,14 @@ clean:
 .PHONY: verify
 verify: clean lint test
 
+.PHONY: docker
+docker:
+	docker build --no-cache . -t $(HUB)/$(PROJECT):$(VERSION)
+
+.PHONY: docker.push
+docker.push: docker
+	docker push $(HUB)/$(PROJECT):$(VERSION)
+
 release-src: clean
 	-mkdir $(RELEASE_SRC)
 	-cp ../NOTICE $(RELEASE_SRC)
diff --git a/action.yaml b/action.yaml
index b6549e4..70d18b7 100644
--- a/action.yaml
+++ b/action.yaml
@@ -31,7 +31,7 @@ runs:
     - shell: bash
       run: |
         cd "$GITHUB_ACTION_PATH"
-        go mod download && make linux && mv bin/linux/e2e /tmp/skywalking-infra-e2e/bin/e2e
+        make docker
     - shell: bash
       run: |
         cd /tmp/skywalking-infra-e2e
@@ -42,4 +42,8 @@ runs:
     - shell: bash
       run: |
         export PATH="$PATH:/tmp/skywalking-infra-e2e/bin"
-        e2e run -c "${{ inputs.e2e-file }}"
\ No newline at end of file
+        docker run --network host \
+                   -v $(pwd):/github/workspace \
+                   -v /var/run/docker.sock:/var/run/docker.sock \
+                   -v /tmp/skywalking-infra-e2e/bin:/tmp/skywalking-infra-e2e/bin \
+                   docker.io/apache/e2e:latest run -c "${{ inputs.e2e-file }}"