Skip to content

[type:refactor] refactor module #211

[type:refactor] refactor module

[type:refactor] refactor module #211

Workflow file for this run

# 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.
#name: e2e
#
#on:
# pull_request:
# push:
# branches:
# - master
#
#env:
# TAG: ${{ github.sha }}
#
#jobs:
# changes:
# runs-on: ubuntu-latest
# outputs:
# e2e: ${{ steps.filter.outputs.e2e }}
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true
# - name: Free disk space
# run: |
# df --human-readable
# sudo apt clean
# docker rmi $(docker image ls --all --quiet)
# rm --recursive --force "$AGENT_TOOLSDIRECTORY"
# df --human-readable
# - uses: dorny/paths-filter@v2
# id: filter
# with:
# filters: '.github/filters.yml'
# list-files: json
#
# build-docker-images:
# needs: changes
# if: ${{ needs.changes.outputs.e2e == 'true' }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true
# - name: Free disk space
# run: |
# df --human-readable
# sudo apt clean
# docker rmi $(docker image ls --all --quiet)
# rm --recursive --force "$AGENT_TOOLSDIRECTORY"
# df --human-readable
#
# - name: Restore ShenYu E2E Maven Repos
# id: restore-e2e-maven-cache
# uses: actions/cache/restore@v3
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-e2e-maven-${{ hashFiles('**/pom.xml') }}
# restore-keys: |
# ${{ runner.os }}-e2e-maven-
#
# - name: Set up JDK 8 for Building ShenYu
# uses: actions/setup-java@v3
# with:
# java-version: '8'
# distribution: 'temurin'
#
# - name: Build Apache ShenYu with Maven
# run: ./mvnw -B clean install -Prelease -Dmaven.javadoc.skip=true -B -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests package
#
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
#
# - name: Build and Export Admin Image
# uses: docker/build-push-action@v3
# with:
# context: ./shenyu-dist/shenyu-admin-dist
# file: ./shenyu-dist/shenyu-admin-dist/docker/Dockerfile
# build-args: APP_NAME=apache-shenyu-*-admin-bin
# tags: shenyu/admin:latest
# outputs: type=docker,dest=/tmp/apache-shenyu-admin.tar
#
# - name: Build and Export Bootstrap Image
# uses: docker/build-push-action@v3
# with:
# context: ./shenyu-dist/shenyu-bootstrap-dist
# file: ./shenyu-dist/shenyu-bootstrap-dist/docker/Dockerfile
# build-args: APP_NAME=apache-shenyu-*-bootstrap-bin
# tags: shenyu/bootstrap:latest
# outputs: type=docker,dest=/tmp/apache-shenyu-bootstrap.tar
#
# - name: Load ShenYu Docker Images
# run: |
# docker load --input /tmp/apache-shenyu-admin.tar
# docker load --input /tmp/apache-shenyu-bootstrap.tar
# docker image ls -a
#
# - name: Set up JDK 11 for Compiling ShenYu E2E Egnine
# uses: actions/setup-java@v3
# with:
# java-version: '11'
# distribution: 'temurin'
#
# - name: Build shenyu-e2e-engine with Maven
# run: ./mvnw -B -f ./shenyu-e2e/pom.xml -pl shenyu-e2e-engine -am clean install
#
# - name: Save ShenYu E2E Maven Repos
# if: steps.restore-e2e-maven-cache.outputs.cache-hit != 'true'
# uses: actions/cache/save@v3
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-e2e-maven-${{ hashFiles('**/pom.xml') }}
#
# - name: Upload Docker Image Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: shenyu-images
# path: /tmp/apache-shenyu-*.tar
# retention-days: 1
#
# e2e-http:
# runs-on: ubuntu-latest
# needs:
# - changes
# - build-docker-images
# if: ${{ needs.changes.outputs.e2e == 'true' }}
# strategy:
# matrix:
# storage: [ "h2", "mysql", "postgres" ]
# steps:
# - uses: actions/download-artifact@v3
# with:
# name: shenyu-images
# path: /tmp/
#
# - name: Load ShenYu Docker Images
# run: |
# docker load --input /tmp/apache-shenyu-admin.tar
# docker load --input /tmp/apache-shenyu-bootstrap.tar
# docker image ls -a
#
# - uses: actions/checkout@v3
# with:
# submodules: true
#
# - name: Cache ShenYu E2E Maven Repos
# uses: actions/cache/restore@v3
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-e2e-maven-${{ hashFiles('**/pom.xml') }}
# restore-keys: |
# ${{ runner.os }}-e2e-maven-
#
# - name: Set up JDK 11
# uses: actions/setup-java@v3
# with:
# java-version: '11'
# distribution: 'temurin'
#
# - name: Run ShenYu E2E Tests
# env:
# storage: ${{ matrix.storage }}
# run: |
# bash ./shenyu-e2e/script/storage_init.sh
# ./mvnw -B -f ./shenyu-e2e/pom.xml -pl shenyu-e2e-case/shenyu-e2e-case-http -am -Dstorage=${{ matrix.storage }} test
#
# e2e-case:
# runs-on: ubuntu-latest
# needs:
# - changes
# - build-docker-images
# if: ${{ needs.changes.outputs.e2e == 'true' }}
# strategy:
# matrix:
# case: [ "shenyu-e2e-case-spring-cloud", "shenyu-e2e-case-apache-dubbo", "shenyu-e2e-case-motan", "shenyu-e2e-case-grpc"]
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true
# - name: Free disk space
# run: |
# df --human-readable
# sudo apt clean
# docker rmi $(docker image ls --all --quiet)
# rm --recursive --force "$AGENT_TOOLSDIRECTORY"
# df --human-readable
#
# - name: Restore ShenYu Maven Repos
# uses: actions/cache/restore@v3
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
# restore-keys: |
# ${{ runner.os }}-maven-
#
# - name: Restore ShenYu E2E Maven Repos
# uses: actions/cache/restore@v3
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-e2e-maven-${{ hashFiles('**/pom.xml') }}
# restore-keys: |
# ${{ runner.os }}-e2e-maven-
#
# - name: Set up JDK 8 for Building ShenYu
# uses: actions/setup-java@v3
# with:
# java-version: '8'
# distribution: 'temurin'
#
# - uses: actions/download-artifact@v3
# with:
# name: shenyu-images
# path: /tmp/
#
# - name: Load ShenYu Docker Images
# run: |
# docker load --input /tmp/apache-shenyu-admin.tar
# docker load --input /tmp/apache-shenyu-bootstrap.tar
# docker image ls -a
#
# - name: Build examples with Maven
# run: ./mvnw -B clean install -Pexample -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -am -f ./shenyu-examples/pom.xml
#
# - uses: actions/checkout@v3
# with:
# submodules: true
#
# - name: Set up JDK 11
# uses: actions/setup-java@v3
# with:
# java-version: '11'
# distribution: 'temurin'
#
# - name: Run ShenYu E2E Tests
# env:
# storage: mysql
# run: |
# bash ./shenyu-e2e/script/storage_init.sh
# ./mvnw -B -f ./shenyu-e2e/pom.xml -pl shenyu-e2e-case/${{ matrix.case }} -am -Dstorage=mysql test
#
# e2e-alibaba-dubbo:
# runs-on: ubuntu-latest
# needs:
# - changes
# - build-docker-images
# if: ${{ needs.changes.outputs.e2e == 'true' }}
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true
#
# - name: Free disk space
# run: |
# df --human-readable
# sudo apt clean
# docker rmi $(docker image ls --all --quiet)
# rm --recursive --force "$AGENT_TOOLSDIRECTORY"
# df --human-readable
#
# - name: Restore ShenYu Maven Repos
# uses: actions/cache/restore@v3
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
# restore-keys: |
# ${{ runner.os }}-maven-
#
# - name: Restore ShenYu E2E Maven Repos
# uses: actions/cache/restore@v3
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-e2e-maven-${{ hashFiles('**/pom.xml') }}
# restore-keys: |
# ${{ runner.os }}-e2e-maven-
#
# - name: Set up JDK 8 for Building ShenYu
# uses: actions/setup-java@v3
# with:
# java-version: '8'
# distribution: 'temurin'
#
# - uses: actions/download-artifact@v3
# with:
# name: shenyu-images
# path: /tmp/
#
# - name: Load ShenYu Docker Images
# run: |
# docker load --input /tmp/apache-shenyu-admin.tar
# docker load --input /tmp/apache-shenyu-bootstrap.tar
# docker image ls -a
#
# - name: remove apache dubbo and add alibaba dubbo dependency with bootstrap
# run: |
# sed -i '319,354d' ./shenyu-bootstrap/pom.xml
# sed -i 's|</dependencies>| <dependency>\n <groupId>org.apache.shenyu</groupId>\n <artifactId>shenyu-spring-boot-starter-plugin-alibaba-dubbo</artifactId>\n <version>${project.version}</version>\n </dependency>\n <dependency>\n <groupId>com.alibaba</groupId>\n <artifactId>dubbo</artifactId>\n <version>${alibaba.dubbo.version}</version>\n </dependency>\n <dependency>\n <groupId>org.apache.curator</groupId>\n <artifactId>curator-client</artifactId>\n <version>${curator.version}</version>\n <exclusions>\n <exclusion>\n <artifactId>log4j</artifactId>\n <groupId>log4j</groupId>\n </exclusion>\n </exclusions>\n </dependency>\n <dependency>\n <groupId>org.apache.curator</groupId>\n <artifactId>curator-framework</artifactId>\n <version>${curator.version}</version>\n </dependency>\n <dependency>\n <groupId>org.apache.curator</groupId>\n <artifactId>curator-recipes</artifactId>\n <version>${curator.version}</version>\n </dependency>\n </dependencies>|' ./shenyu-bootstrap/pom.xml
#
# - name: Build with Maven
# run: ./mvnw -B clean install -Prelease,docker -Dmaven.javadoc.skip=true -Dmaven.test.skip=true
#
# - name: Build examples with Maven
# run: ./mvnw -B clean install -Pexample -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -am -f ./shenyu-examples/pom.xml
#
# - uses: actions/checkout@v3
# with:
# submodules: true
#
# - name: Set up JDK 11
# uses: actions/setup-java@v3
# with:
# java-version: '11'
# distribution: 'temurin'
#
# - name: Run ShenYu E2E Tests
# env:
# storage: mysql
# run: |
# bash ./shenyu-e2e/script/storage_init.sh
# ./mvnw -B -f ./shenyu-e2e/pom.xml -pl shenyu-e2e-case/shenyu-e2e-case-alibaba-dubbo -am -Dstorage=mysql test
#
# requirement:
# name: e2e
# if: ${{ needs.changes.outputs.e2e == 'true' }}
# needs:
# - changes
# - e2e-http
# - e2e-case
# - e2e-alibaba-dubbo
# runs-on: ubuntu-latest
# steps:
# - name: checking job status
# run: |
# [[ "${{ needs.e2e-http.result }}" == "success" ]] || exit -1
# [[ "${{ needs.e2e-case.result }}" == "success" ]] || exit -1
# [[ "${{ needs.e2e-alibaba-dubbo.result }}" == "success" ]] || exit -1