Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:add example.yaml for release #187

Merged
merged 6 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release

on:
workflow_dispatch:
inputs:
subdir:
description: 'Subdirectory'
required: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup JDK 8
uses: AdoptOpenJDK/install-jdk@v1
with:
version: '8'
architecture: x64
targets: 'JAVA_8_HOME'

- name: Setup JDK 11
uses: AdoptOpenJDK/install-jdk@v1
with:
version: '11'
architecture: x64
targets: 'JAVA_11_HOME'

- name: Setup JDK 17
uses: AdoptOpenJDK/install-jdk@v1
with:
version: '17'
architecture: x64
targets: 'JAVA_17_HOME;JAVA_HOME'

- name: Install xmllint
run: sudo apt-get install libxml2-utils

- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
config-inline: |
insecure-entitlements = [ "network.host" ]

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.POLARIS_DOCKER_NAME }}
password: ${{ secrets.POLARIS_DOCKER_PASSWORD }}

- name: Build
id: build
run: |
export use_docker_env=false
pushd polaris-agent-build/bin
bash ./build.sh
bash ./build_example_docker.sh ${{ github.event.inputs.subdir }}

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
consumer:
serviceRouter:
plugin:
# 设置就近路由插件配置
nearbyBasedRouter:
# 描述:就近路由的最小匹配级别,需要显示设置
# 范围: zone(腾讯云地域信息,eg: ap-guangzhou)、campus(腾讯云可用区, eg: ap-guangzhou-3)
matchLevel: campus
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
server.port=65001
spring.application.name=service-provider-hoxton
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.enabled=false
spring.cloud.nacos.discovery.enabled=false

spring.cloud.nacos.username=nacos
spring.cloud.nacos.password=nacos
management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=always

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
server.port=65004
spring.application.name=service-provider-hoxton
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.enabled=false
spring.cloud.nacos.discovery.enabled=false

spring.cloud.nacos.username=nacos
spring.cloud.nacos.password=nacos
management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=always

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# the application name for spring cloud, register as the service name in registry center
spring.application.name=service-consumer-H
spring.application.name=service-consumer-hoxton
# polaris server address
spring.cloud.polaris.address=grpc\://111.230.207.241\:8091
spring.cloud.polaris.address=grpc\://127.0.0.1\:8091
# switch for spring cloud polaris all features
spring.cloud.polaris.enabled=true
# switch for spring cloud discovery feature
Expand All @@ -22,6 +22,9 @@ spring.cloud.polaris.router.rule-router.enabled=true
spring.cloud.polaris.router.metadata-router.enabled=true
# switch for polaris router(nearby-router) feature
spring.cloud.polaris.router.nearby-router.enabled=true
# switch for circuitbreaker
spring.cloud.polaris.circuitbreaker.enabled=true
feign.hystrix.enabled=true
# switch for polaris ratelimit feature
spring.cloud.polaris.ratelimit.enabled=false
# rejectHttpCode for polaris ratelimit, will be returned as limited
Expand All @@ -39,4 +42,4 @@ spring.cloud.polaris.stat.port=0
# path for polaris stat
spring.cloud.polaris.stat.path=/metrics

logging.level.root=DEBUG
logging.level.root=INFO