From e19efe0bcd17dae2175386ea653acc0b00bb5de6 Mon Sep 17 00:00:00 2001 From: Winlin Date: Thu, 27 Jul 2023 09:07:31 +0800 Subject: [PATCH] Support helm to optimize the deployment procedure of a SRS cluster. v6.0.64 (#3611) 1. Introduce a novel Docker tag in the x.y.z format, akin to the HELM format, such as ossrs/srs:5.0.155. 2. Incorporate the SRS_PLATFORM flag for containers initiated through HELM. --------- `TRANS_BY_GPT3` --------- Co-authored-by: chundonglinlin --- .github/workflows/release.yml | 16 ++++++++++++++++ trunk/doc/CHANGELOG.md | 1 + trunk/src/app/srs_app_latest_version.cpp | 2 ++ trunk/src/core/srs_core_version6.hpp | 2 +- 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b85892e2d..573cb72d95 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,7 @@ jobs: # SRS_VERSION=6.0.145 # SRS_VERSION=6.0-r8 # SRS_MAJOR=6 + # SRS_XYZ=6.0.145 # @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable - name: Generate varaiables run: | @@ -34,11 +35,18 @@ jobs: echo "SRS_VERSION=$SRS_VERSION" >> $GITHUB_ENV SRS_MAJOR=$(echo $SRS_TAG| cut -c 2) echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV + VFILE="trunk/src/core/srs_core_version6.hpp" + SRS_X=$(cat $VFILE |grep VERSION_MAJOR |awk '{print $3}') + SRS_Y=$(cat $VFILE |grep VERSION_MINOR |awk '{print $3}') + SRS_Z=$(cat $VFILE |grep VERSION_REVISION |awk '{print $3}') + SRS_XYZ=$SRS_X.$SRS_Y.$SRS_Z + echo "SRS_XYZ=$SRS_XYZ" >> $GITHUB_ENV # Map a step output to a job output, see https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs outputs: SRS_TAG: ${{ env.SRS_TAG }} SRS_VERSION: ${{ env.SRS_VERSION }} SRS_MAJOR: ${{ env.SRS_MAJOR }} + SRS_XYZ: ${{ env.SRS_XYZ }} runs-on: ubuntu-20.04 test: @@ -242,6 +250,7 @@ jobs: echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV + echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV ################################################################################################################## # Git checkout - name: Checkout repository @@ -278,6 +287,8 @@ jobs: ossrs/srs:${{ env.SRS_VERSION }} ossrs/srs:${{ env.SRS_MAJOR }} ossrs/srs:v${{ env.SRS_MAJOR }} + ossrs/srs:${{ env.SRS_XYZ }} + ossrs/srs:v${{ env.SRS_XYZ }} runs-on: ubuntu-20.04 aliyun-srs: @@ -293,6 +304,7 @@ jobs: echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV + echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV # Aliyun ACR # TODO: FIXME: If stable, please set the latest from 5.0 to 6.0 - name: Login aliyun hub @@ -310,6 +322,8 @@ jobs: registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_VERSION }} registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }} registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v${{ env.SRS_MAJOR }} + registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_XYZ }} + registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v${{ env.SRS_XYZ }} runs-on: ubuntu-20.04 update: @@ -434,10 +448,12 @@ jobs: ## Docker * [docker pull ossrs/srs:${{ env.SRS_MAJOR }}](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started) * [docker pull ossrs/srs:${{ env.SRS_TAG }}](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started) + * [docker pull ossrs/srs:${{ env.SRS_XYZ }}](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started) ## Docker Mirror: aliyun.com * [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }}](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started) * [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started) + * [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_XYZ }}](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started) ## Doc: ossrs.io * [Getting Started](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started) diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index b359e8cca3..629e2a5c7f 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -7,6 +7,7 @@ The changelog for SRS. ## SRS 6.0 Changelog +* v6.0, 2023-07-27, Merge [#3611](https://github.com/ossrs/srs/pull/3611): Design and implement helm capabilities to streamline the deployment process of an SRS cluster.. v6.0.63 (#3611) * v6.0, 2023-07-27, Merge [#3703](https://github.com/ossrs/srs/pull/3703): The identifier "ShowCouroutines" needs to be modified to "ShowCoroutines" in order to rectify the typographical error.. v6.0.62 (#3703) * v6.0, 2023-07-26, Merge [#3699](https://github.com/ossrs/srs/pull/3699): Bugfix: Eliminate the redundant declaration of the _srs_rtc_manager variable.. v6.0.61 (#3699) * v6.0, 2023-07-21, Merge [#3695](https://github.com/ossrs/srs/pull/3695): API: Fix HTTPS callback issue using SNI in TLS client handshake. v6.0.61 (#3695) diff --git a/trunk/src/app/srs_app_latest_version.cpp b/trunk/src/app/srs_app_latest_version.cpp index 641aa89aab..9795fae372 100644 --- a/trunk/src/app/srs_app_latest_version.cpp +++ b/trunk/src/app/srs_app_latest_version.cpp @@ -70,6 +70,8 @@ void srs_build_features(stringstream& ss) SRS_CHECK_FEATURE2(_srs_config->get_raw_api(), "raw", ss); SRS_CHECK_FEATURE2(_srs_config->get_exporter_enabled(), "prom", ss); + string platform = srs_getenv("SRS_PLATFORM"); + SRS_CHECK_FEATURE3(!string(platform).empty(), "plat", platform, ss); string region = srs_getenv("SRS_REGION"); SRS_CHECK_FEATURE3(!string(region).empty(), "region", region, ss); string source = srs_getenv("SRS_SOURCE"); diff --git a/trunk/src/core/srs_core_version6.hpp b/trunk/src/core/srs_core_version6.hpp index 9d79950e2b..0de2b32e61 100644 --- a/trunk/src/core/srs_core_version6.hpp +++ b/trunk/src/core/srs_core_version6.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 6 #define VERSION_MINOR 0 -#define VERSION_REVISION 63 +#define VERSION_REVISION 64 #endif