From c1642232e5e5b87e741ab766821545afb955ef29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Qi=CE=BC=24hi=D0=AFu=C3=AD?= <39378935+srstack@users.noreply.github.com> Date: Wed, 15 Dec 2021 11:24:35 +0800 Subject: [PATCH 1/2] cluster: add configuration rendering for web listen-address (#1669) --- embed/examples/cluster/topology.example.yaml | 2 ++ embed/templates/scripts/run_alertmanager.sh.tpl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/embed/examples/cluster/topology.example.yaml b/embed/examples/cluster/topology.example.yaml index 2ed019a49d..b2cf3d301c 100644 --- a/embed/examples/cluster/topology.example.yaml +++ b/embed/examples/cluster/topology.example.yaml @@ -308,6 +308,8 @@ alertmanager_servers: - host: 10.0.1.21 # # SSH port of the server. # ssh_port: 22 + # Alertmanager web service listen host. + # listen_host: 0.0.0.0 # # Alertmanager web service port. # web_port: 9093 # # Alertmanager communication port. diff --git a/embed/templates/scripts/run_alertmanager.sh.tpl b/embed/templates/scripts/run_alertmanager.sh.tpl index e7925035fc..da319bf520 100644 --- a/embed/templates/scripts/run_alertmanager.sh.tpl +++ b/embed/templates/scripts/run_alertmanager.sh.tpl @@ -19,7 +19,7 @@ exec bin/alertmanager/alertmanager \ --storage.path="{{.DataDir}}" \ --data.retention=120h \ --log.level="info" \ - --web.listen-address="{{.IP}}:{{.WebPort}}" \ + --web.listen-address="{{.ListenHost}}:{{.WebPort}}" \ --web.external-url="http://{{.IP}}:{{.WebPort}}" \ {{- if .EndPoints}} {{- range $idx, $am := .EndPoints}} From 5eb7abfdd768b3d38b58c432a90c73970ec2c11d Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Wed, 15 Dec 2021 12:14:35 +0800 Subject: [PATCH 2/2] ci: run integrate tests daily to update codecov stats (#1672) --- .codecov.yml | 11 +++++++++++ .github/workflows/integrate-cluster-cmd.yaml | 7 ++++++- .github/workflows/integrate-cluster-scale.yaml | 7 ++++++- .github/workflows/integrate-dm.yaml | 7 ++++++- .github/workflows/integrate-playground.yaml | 7 ++++++- .github/workflows/integrate-tiup.yaml | 11 +++++++++-- .github/workflows/release-tiup.yaml | 7 ++++++- tests/tiup-cluster/test_scale_core_tls.sh | 4 ++-- tests/tiup-cluster/test_scale_tools_tls.sh | 4 ++-- tests/tiup-cluster/test_upgrade_tls.sh | 4 ++-- 10 files changed, 56 insertions(+), 13 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 9fa984bd6e..efcba79048 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -4,8 +4,19 @@ codecov: wait_for_ci: no coverage: + round: nearest range: 30..70 ignore: - "pkg/cluster/api/dmpb" - "pkg/cluster/api/typeutil" + +flags: + tiup: + carryforward: true + cluster: + carryforward: true + dm: + carryforward: true + playground: + carryforward: true diff --git a/.github/workflows/integrate-cluster-cmd.yaml b/.github/workflows/integrate-cluster-cmd.yaml index d4e6725a7e..503152127e 100644 --- a/.github/workflows/integrate-cluster-cmd.yaml +++ b/.github/workflows/integrate-cluster-cmd.yaml @@ -2,6 +2,9 @@ name: integrate-cluster-cmd on: + schedule: + # times are in UTC + - cron: '19 21 * * *' pull_request: branches: - master @@ -109,4 +112,6 @@ jobs: - name: Upload coverage to Codecov working-directory: ${{ env.working-directory }} run: | - curl -s https://codecov.io/bash | bash -s - -F integrate,cluster -s ${{ env.working-directory }}/tests/tiup-cluster/cover -f '*.out' + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov -F cluster -s ${{ env.working-directory }}/tests/tiup-cluster/cover -f '*.out' diff --git a/.github/workflows/integrate-cluster-scale.yaml b/.github/workflows/integrate-cluster-scale.yaml index f5dc4c1f81..9af6153b9c 100644 --- a/.github/workflows/integrate-cluster-scale.yaml +++ b/.github/workflows/integrate-cluster-scale.yaml @@ -2,6 +2,9 @@ name: integrate-cluster-scale on: + schedule: + # times are in UTC + - cron: '19 21 * * *' pull_request: branches: - master @@ -110,4 +113,6 @@ jobs: - name: Upload coverage to Codecov working-directory: ${{ env.working-directory }} run: | - curl -s https://codecov.io/bash | bash -s - -F integrate,cluster -s ${{ env.working-directory }}/tests/tiup-cluster/cover -f '*.out' + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov -F cluster -s ${{ env.working-directory }}/tests/tiup-cluster/cover -f '*.out' diff --git a/.github/workflows/integrate-dm.yaml b/.github/workflows/integrate-dm.yaml index fb140fda72..173c05bdff 100644 --- a/.github/workflows/integrate-dm.yaml +++ b/.github/workflows/integrate-dm.yaml @@ -2,6 +2,9 @@ name: integrate-dm on: + schedule: + # times are in UTC + - cron: '19 21 * * *' pull_request: branches: - master @@ -114,4 +117,6 @@ jobs: - name: Upload coverage to Codecov working-directory: ${{ env.working-directory }} run: | - curl -s https://codecov.io/bash | bash -s - -F integrate,dm -s ${{ env.working-directory }}/tests/tiup-dm/cover -f '*.out' + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov -F dm -s ${{ env.working-directory }}/tests/tiup-dm/cover -f '*.out' diff --git a/.github/workflows/integrate-playground.yaml b/.github/workflows/integrate-playground.yaml index 55d72e8823..07d1a21a38 100644 --- a/.github/workflows/integrate-playground.yaml +++ b/.github/workflows/integrate-playground.yaml @@ -2,6 +2,9 @@ name: integrate-playground on: + schedule: + # times are in UTC + - cron: '19 21 * * *' pull_request: branches: - master @@ -90,4 +93,6 @@ jobs: - name: Upload coverage to Codecov working-directory: ${{ env.working-directory }} run: | - curl -s https://codecov.io/bash | bash -s - -F integrate,playground -s ${{ env.working-directory }}/tests/tiup-playground/cover -f '*.out' + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov -F playground -s ${{ env.working-directory }}/tests/tiup-playground/cover -f '*.out' diff --git a/.github/workflows/integrate-tiup.yaml b/.github/workflows/integrate-tiup.yaml index 07758e24a6..441e438632 100644 --- a/.github/workflows/integrate-tiup.yaml +++ b/.github/workflows/integrate-tiup.yaml @@ -2,6 +2,9 @@ name: integrate-tiup on: + schedule: + # times are in UTC + - cron: '19 21 * * *' pull_request: branches: - master @@ -72,7 +75,9 @@ jobs: - name: Upload coverage to Codecov working-directory: ${{ env.working-directory }} run: | - curl -s https://codecov.io/bash | bash -s - -F integrate,tiup -s ${{ env.working-directory }}/tests/tiup/cover -f '*.out' + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov -F tiup -s ${{ env.working-directory }}/tests/tiup/cover -f '*.out' unit-test: runs-on: ubuntu-latest @@ -102,4 +107,6 @@ jobs: - name: Upload coverage to Codecov working-directory: ${{ env.working-directory }} run: | - curl -s https://codecov.io/bash | bash -s - -F unittest -s cover -f '*.out' + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov -F unittest -s cover -f '*.out' diff --git a/.github/workflows/release-tiup.yaml b/.github/workflows/release-tiup.yaml index 946dfc10fa..070af1a24a 100644 --- a/.github/workflows/release-tiup.yaml +++ b/.github/workflows/release-tiup.yaml @@ -16,6 +16,11 @@ on: release: types: - published + workflow_dispatch: + inputs: + git-ref: + description: git ref + required: true jobs: release: @@ -42,7 +47,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.inputs.git-ref || github.event.pull_request.head.sha }} path: go/src/github.com/${{ github.repository }} fetch-depth: 0 diff --git a/tests/tiup-cluster/test_scale_core_tls.sh b/tests/tiup-cluster/test_scale_core_tls.sh index 94595bd3a5..5c09b082c8 100755 --- a/tests/tiup-cluster/test_scale_core_tls.sh +++ b/tests/tiup-cluster/test_scale_core_tls.sh @@ -4,5 +4,5 @@ set -eu source script/scale_core.sh -echo "test scaling of core components in cluster for version v4.0.12 w/ TLS, via easy ssh" -scale_core v4.0.12 true false +echo "test scaling of core components in cluster for version v5.3.0 w/ TLS, via easy ssh" +scale_core v5.3.0 true false diff --git a/tests/tiup-cluster/test_scale_tools_tls.sh b/tests/tiup-cluster/test_scale_tools_tls.sh index de1bb7b51a..b3b9aaddb6 100755 --- a/tests/tiup-cluster/test_scale_tools_tls.sh +++ b/tests/tiup-cluster/test_scale_tools_tls.sh @@ -4,5 +4,5 @@ set -eu source script/scale_tools.sh -echo "test scaling of tools components in cluster for version v4.0.12 w/ TLS, via easy ssh" -scale_tools v4.0.12 true false +echo "test scaling of tools components in cluster for version v5.3.0 w/ TLS, via easy ssh" +scale_tools v5.3.0 true false diff --git a/tests/tiup-cluster/test_upgrade_tls.sh b/tests/tiup-cluster/test_upgrade_tls.sh index 45236b9689..54f93198dd 100755 --- a/tests/tiup-cluster/test_upgrade_tls.sh +++ b/tests/tiup-cluster/test_upgrade_tls.sh @@ -2,8 +2,8 @@ set -eu -old_version=${old_version-v3.0.20} -version=${version-v4.0.12} +old_version=${old_version-v4.0.15} +version=${version-v5.3.0} source script/upgrade.sh