You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2021/09/27 15:56:41 UTC
[skywalking] branch master updated: Add tag mangement to e2e-v2
(#7821)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 986073f Add tag mangement to e2e-v2 (#7821)
986073f is described below
commit 986073f949b845324528838cc908e19465102ef6
Author: mrproliu <74...@qq.com>
AuthorDate: Mon Sep 27 23:56:28 2021 +0800
Add tag mangement to e2e-v2 (#7821)
---
.github/actions/infra-e2e-test/action.yml | 9 --------
test/e2e-v2/cases/satellite/Dockerfile.satellite | 2 +-
.../cases/satellite/native-protocols/e2e.yaml | 3 ++-
.../expected/dependency-services.yml | 15 ++++++++++++
test/e2e-v2/java-test-service/Dockerfile.provider | 27 ----------------------
test/e2e-v2/script/docker-compose/base-compose.yml | 22 ++++++++----------
.../Dockerfile.consumer => script/env} | 15 +++---------
.../prepare/setup-e2e-shell/install-swctl.sh | 2 +-
8 files changed, 32 insertions(+), 63 deletions(-)
diff --git a/.github/actions/infra-e2e-test/action.yml b/.github/actions/infra-e2e-test/action.yml
index 9eb9a36..6e9d919 100644
--- a/.github/actions/infra-e2e-test/action.yml
+++ b/.github/actions/infra-e2e-test/action.yml
@@ -34,15 +34,6 @@ runs:
${{ runner.os }}-maven-
- name: Check License
uses: apache/skywalking-eyes@a63f4afcc287dfb3727ecc45a4afc55a5e69c15f
- - name: Setup E2E env
- shell: bash
- run: |
- function export_env() {
- echo "$1=$2" >> $GITHUB_ENV
- }
-
- export_env SW_AGENT_JAVA_COMMIT 3997f0256056788bd054ee37e4603c11c0fd6756
- export_env SW_AGENT_SATELLITE_COMMIT 1f3c08a5af19f8522f2a40d9339c45fa816bfe07
- name: Build Docker Image
shell: bash
env:
diff --git a/test/e2e-v2/cases/satellite/Dockerfile.satellite b/test/e2e-v2/cases/satellite/Dockerfile.satellite
index 60aace5..43865f1 100644
--- a/test/e2e-v2/cases/satellite/Dockerfile.satellite
+++ b/test/e2e-v2/cases/satellite/Dockerfile.satellite
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-ARG SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
+ARG SW_AGENT_SATELLITE_COMMIT=
FROM ghcr.io/apache/skywalking-satellite/skywalking-satellite:v${SW_AGENT_SATELLITE_COMMIT} as base
FROM alpine:3.10
diff --git a/test/e2e-v2/cases/satellite/native-protocols/e2e.yaml b/test/e2e-v2/cases/satellite/native-protocols/e2e.yaml
index 98f9829..d57422b 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/e2e.yaml
+++ b/test/e2e-v2/cases/satellite/native-protocols/e2e.yaml
@@ -19,6 +19,7 @@ setup:
env: compose
file: docker-compose.yml
timeout: 1200
+ init-system-environment: ../../../script/env
steps:
- name: install yq
command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
@@ -29,7 +30,7 @@ setup:
cleanup:
# always never success failure
- on: no
+ on: always
trigger:
action: http
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/dependency-services.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/dependency-services.yml
index 8ec023d..7b6996c 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/dependency-services.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/dependency-services.yml
@@ -33,6 +33,12 @@ nodes:
type: Tomcat
isreal: true
{{- end }}
+{{- if eq .name "localhost:-1" }}
+- id: {{ b64enc "localhost:-1" }}.0
+ name: localhost:-1
+ type: H2
+ isreal: false
+{{- end }}
{{- end }}
calls:
{{- range .calls }}
@@ -46,6 +52,15 @@ calls:
- CLIENT
- SERVER
{{- end }}
+{{- if eq .source "ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1" }}
+- source: {{ b64enc "e2e-service-provider" }}.1
+ sourcecomponents: []
+ target: {{ b64enc "localhost:-1"}}.0
+ targetcomponents: []
+ id: {{ b64enc "e2e-service-provider" }}.1-{{ b64enc "localhost:-1"}}.0
+ detectpoints:
+ - CLIENT
+{{- end }}
{{- if eq .source "VXNlcg==.0" }}
- source: {{ b64enc "User" }}.0
sourcecomponents: []
diff --git a/test/e2e-v2/java-test-service/Dockerfile.provider b/test/e2e-v2/java-test-service/Dockerfile.provider
deleted file mode 100644
index f857288..0000000
--- a/test/e2e-v2/java-test-service/Dockerfile.provider
+++ /dev/null
@@ -1,27 +0,0 @@
-# Licensed to the 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.
-# The 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.
-
-ARG SW_AGENT_JDK_VERSION=8
-ARG SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
-
-FROM ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}
-
-VOLUME /services
-
-ENV SW_LOGGING_OUTPUT=CONSOLE
-
-ADD e2e-service-provider/target/e2e-service-provider-2.0.0.jar /services/
-
-CMD ["sh", "-c", "java -jar /services/e2e-service-provider-2.0.0.jar"]
diff --git a/test/e2e-v2/script/docker-compose/base-compose.yml b/test/e2e-v2/script/docker-compose/base-compose.yml
index 975d5d9..39db0b0 100644
--- a/test/e2e-v2/script/docker-compose/base-compose.yml
+++ b/test/e2e-v2/script/docker-compose/base-compose.yml
@@ -52,12 +52,10 @@ services:
- SW_OAP_ADDRESS=http://oap:12800
provider:
- build:
- context: ../../java-test-service/
- dockerfile: Dockerfile.provider
- args:
- - SW_AGENT_JDK_VERSION=${SW_AGENT_JDK_VERSION}
- - SW_AGENT_JAVA_COMMIT=${SW_AGENT_JAVA_COMMIT}
+ image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}"
+ volumes:
+ - ./../../java-test-service/e2e-service-provider/target/e2e-service-provider-2.0.0.jar:/services_provider.jar
+ command: [ "java", "-jar", "/services_provider.jar" ]
networks:
- e2e
expose:
@@ -65,6 +63,7 @@ services:
- 5005
environment:
SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
+ SW_LOGGING_OUTPUT: CONSOLE
SW_AGENT_NAME: e2e-service-provider
SW_AGENT_INSTANCE_NAME: provider1
SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1
@@ -76,12 +75,10 @@ services:
retries: 120
consumer:
- build:
- context: ../../java-test-service/
- dockerfile: Dockerfile.consumer
- args:
- - SW_AGENT_JDK_VERSION=${SW_AGENT_JDK_VERSION}
- - SW_AGENT_JAVA_COMMIT=${SW_AGENT_JAVA_COMMIT}
+ image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}"
+ volumes:
+ - ../../java-test-service/e2e-service-consumer/target/e2e-service-consumer-2.0.0.jar:/services_consumer.jar
+ command: ["java", "-jar", "/services_consumer.jar"]
networks:
- e2e
expose:
@@ -89,6 +86,7 @@ services:
- 5005
environment:
SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
+ SW_LOGGING_OUTPUT: CONSOLE
PROVIDER_URL: http://provider:9090
SW_AGENT_NAME: e2e-service-consumer
SW_AGENT_INSTANCE_NAME: consumer1
diff --git a/test/e2e-v2/java-test-service/Dockerfile.consumer b/test/e2e-v2/script/env
similarity index 66%
rename from test/e2e-v2/java-test-service/Dockerfile.consumer
rename to test/e2e-v2/script/env
index a9926c2..b91bdea 100644
--- a/test/e2e-v2/java-test-service/Dockerfile.consumer
+++ b/test/e2e-v2/script/env
@@ -13,15 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-ARG SW_AGENT_JDK_VERSION=8
-ARG SW_AGENT_JAVA_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
-
-FROM ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}
-
-VOLUME /services
-
-ENV SW_LOGGING_OUTPUT=CONSOLE
-
-ADD e2e-service-consumer/target/e2e-service-consumer-2.0.0.jar /services/
-
-CMD ["sh", "-c", "java -jar /services/e2e-service-consumer-2.0.0.jar"]
+SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
+SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
+SW_CTL_COMMIT=401e0e5671a3fb49de1d1e1e89f5b693b2062867
\ No newline at end of file
diff --git a/test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh b/test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh
index d2d5113..5893252 100644
--- a/test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh
+++ b/test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh
@@ -24,7 +24,7 @@ BIN_DIR=$2
if ! command -v swctl &> /dev/null; then
mkdir -p $BASE_DIR/swctl && cd $BASE_DIR/swctl
- curl -kLo skywalking-cli.tar.gz https://github.com/apache/skywalking-cli/archive/401e0e5671a3fb49de1d1e1e89f5b693b2062867.tar.gz
+ curl -kLo skywalking-cli.tar.gz https://github.com/apache/skywalking-cli/archive/${SW_CTL_COMMIT}.tar.gz
tar -zxf skywalking-cli.tar.gz --strip=1
utype=$(uname | awk '{print tolower($0)}')
make $utype && mv bin/swctl-*-$utype-amd64 $BIN_DIR/swctl