From 12929664fab465be05583a1485bc5712a67a6ffe Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 21:26:06 +0800 Subject: [PATCH 01/22] dasf --- pkg/print/print_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/print/print_test.go b/pkg/print/print_test.go index 4f45fda3..c7655128 100644 --- a/pkg/print/print_test.go +++ b/pkg/print/print_test.go @@ -11,6 +11,7 @@ var _ = Describe("Print", Label("unitest"), func() { It("test output", func() { print.MyPrint() print.MyPrint() + Expect(1).To(Equal(1)) }) }) From 008c38b0bc5d9048c82c353e1dd63f2cc204f277 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 21:31:50 +0800 Subject: [PATCH 02/22] dasf --- pkg/print/print_suite_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/print/print_suite_test.go b/pkg/print/print_suite_test.go index 75e9c88e..0fa49dbb 100644 --- a/pkg/print/print_suite_test.go +++ b/pkg/print/print_suite_test.go @@ -10,4 +10,5 @@ import ( func TestPrint(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Print Suite") + } From 817ff24a21fb690608a429db837f9c1ef6121890 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 21:36:34 +0800 Subject: [PATCH 03/22] dasf --- pkg/print/print_suite_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/print/print_suite_test.go b/pkg/print/print_suite_test.go index 0fa49dbb..0e0dede0 100644 --- a/pkg/print/print_suite_test.go +++ b/pkg/print/print_suite_test.go @@ -9,6 +9,7 @@ import ( func TestPrint(t *testing.T) { RegisterFailHandler(Fail) + RunSpecs(t, "Print Suite") } From 876b002d939713cb33b83d195e750783753f0282 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 21:43:52 +0800 Subject: [PATCH 04/22] v --- pkg/lock/lock.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/lock/lock.go b/pkg/lock/lock.go index daba7ca1..05fe72fa 100644 --- a/pkg/lock/lock.go +++ b/pkg/lock/lock.go @@ -1,6 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright Authors of Cilium - package lock // RWMutex is equivalent to sync.RWMutex but applies deadlock detection if the From 14f9e969d873aefee05fb85f63309730ae9d5cfe Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 21:44:15 +0800 Subject: [PATCH 05/22] v --- pkg/lock/lock.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/lock/lock.go b/pkg/lock/lock.go index 05fe72fa..4fca10c4 100644 --- a/pkg/lock/lock.go +++ b/pkg/lock/lock.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium package lock // RWMutex is equivalent to sync.RWMutex but applies deadlock detection if the From baad7db87e1e7ed0f4c965f04fce07f9651bc3b5 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 21:51:40 +0800 Subject: [PATCH 06/22] v --- pkg/print/print_suite_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/print/print_suite_test.go b/pkg/print/print_suite_test.go index 0e0dede0..22238162 100644 --- a/pkg/print/print_suite_test.go +++ b/pkg/print/print_suite_test.go @@ -8,6 +8,7 @@ import ( ) func TestPrint(t *testing.T) { + RegisterFailHandler(Fail) RunSpecs(t, "Print Suite") From b5f7a8b0c61bac7d83747a8d103d4d796727bc03 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 21:56:07 +0800 Subject: [PATCH 07/22] v --- pkg/print/print_suite_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/print/print_suite_test.go b/pkg/print/print_suite_test.go index 22238162..0e0dede0 100644 --- a/pkg/print/print_suite_test.go +++ b/pkg/print/print_suite_test.go @@ -8,7 +8,6 @@ import ( ) func TestPrint(t *testing.T) { - RegisterFailHandler(Fail) RunSpecs(t, "Print Suite") From 944701d9f04a29e18e9ef7ddabeda8f4899bdb11 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 21:59:00 +0800 Subject: [PATCH 08/22] v --- pkg/lock/lock.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/lock/lock.go b/pkg/lock/lock.go index 4fca10c4..32c00cab 100644 --- a/pkg/lock/lock.go +++ b/pkg/lock/lock.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of helloword package lock // RWMutex is equivalent to sync.RWMutex but applies deadlock detection if the From 6fc841ecc4880565f09b3304ed93f81740e0af32 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 22:08:34 +0800 Subject: [PATCH 09/22] v --- pkg/lock/lock.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/lock/lock.go b/pkg/lock/lock.go index 32c00cab..c449e158 100644 --- a/pkg/lock/lock.go +++ b/pkg/lock/lock.go @@ -1,5 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright Authors of helloword + package lock // RWMutex is equivalent to sync.RWMutex but applies deadlock detection if the From 17326fb1b0103736bb0aecfd644e2520391d2d70 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 22:13:18 +0800 Subject: [PATCH 10/22] v --- pkg/lock/lock.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/lock/lock.go b/pkg/lock/lock.go index c449e158..32c00cab 100644 --- a/pkg/lock/lock.go +++ b/pkg/lock/lock.go @@ -1,6 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright Authors of helloword - package lock // RWMutex is equivalent to sync.RWMutex but applies deadlock detection if the From 05843c17e3d7a514b50f5efd9e51ac4f4195a077 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 22:39:48 +0800 Subject: [PATCH 11/22] v --- pkg/lock/lock.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/lock/lock.go b/pkg/lock/lock.go index 32c00cab..c449e158 100644 --- a/pkg/lock/lock.go +++ b/pkg/lock/lock.go @@ -1,5 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright Authors of helloword + package lock // RWMutex is equivalent to sync.RWMutex but applies deadlock detection if the From 96cf860d6de76ba2eac2470d8f12a1ce8b31b2f0 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 23:00:33 +0800 Subject: [PATCH 12/22] v --- pkg/lock/lock.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/lock/lock.go b/pkg/lock/lock.go index c449e158..32c00cab 100644 --- a/pkg/lock/lock.go +++ b/pkg/lock/lock.go @@ -1,6 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright Authors of helloword - package lock // RWMutex is equivalent to sync.RWMutex but applies deadlock detection if the From 8974117e46a2a7672796eca2217da6950fce2cfe Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 23:08:51 +0800 Subject: [PATCH 13/22] v --- pkg/lock/lock.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/lock/lock.go b/pkg/lock/lock.go index 32c00cab..c449e158 100644 --- a/pkg/lock/lock.go +++ b/pkg/lock/lock.go @@ -1,5 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright Authors of helloword + package lock // RWMutex is equivalent to sync.RWMutex but applies deadlock detection if the From e98f4743345b670240022a167b6617b70be01f3b Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Fri, 1 Apr 2022 23:33:49 +0800 Subject: [PATCH 14/22] v --- pkg/lock/lock.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/lock/lock.go b/pkg/lock/lock.go index c449e158..32c00cab 100644 --- a/pkg/lock/lock.go +++ b/pkg/lock/lock.go @@ -1,6 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright Authors of helloword - package lock // RWMutex is equivalent to sync.RWMutex but applies deadlock detection if the From bbb37347765b039dd667c7720330363334921231 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Sat, 2 Apr 2022 12:01:00 +0800 Subject: [PATCH 15/22] e3wf --- .github/workflows/release-chart.yaml | 44 ++++++++++------------------ 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index 014e3d31..18ecbdc7 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -69,24 +69,19 @@ jobs: exit 1 fi cd .. - mkdir -p docs/charts - mv charts/*.tgz docs/charts + mkdir -p tmp/charts + mv charts/*.tgz tmp/charts git checkout -- charts - - - name: Prepare Index - continue-on-error: false - run: | - #rebuild index for docs/charts - cd docs + # rebuild index.yaml + cd tmp helm repo index ./charts --url ${{ steps.get_base_url.outputs.url }}/charts mv ./charts/index.yaml ./ - - name: Upload Chart Package uses: actions/upload-artifact@v3.0.0 with: name: chart-package - path: ./docs/charts/* + path: tmp/charts/* retention-days: 1 if-no-files-found: error @@ -94,26 +89,17 @@ jobs: uses: actions/upload-artifact@v3.0.0 with: name: chart-package - path: ./docs/index.yaml + path: tmp/index.yaml retention-days: 1 if-no-files-found: error - - name: Create Pull Request - id: create_pr - uses: peter-evans/create-pull-request@v4 + # https://github.com/marketplace/actions/deploy-to-github-pages + - name: Deploy To GithubPages + uses: JamesIves/github-pages-deploy-action@v4.2.5 with: - title: "robot Update chart from ${{ steps.get_version.outputs.version }} to branch ${{ env.MERGE_BRANCH }} " - # from branch - commit-message: "robot Update chart from ${{ steps.get_version.outputs.version }} to branch ${{ env.MERGE_BRANCH }} " - # branch name: ${branch}-${branch-suffix} - # an branch suffix could make sure the branch is unique - branch-suffix: timestamp - branch: update_chart - # Delete the branch when closing pull requests, and when undeleted after merging - delete-branch: true - # merge to - base: ${{ env.MERGE_BRANCH }} - signoff: true - token: ${{ secrets.GITHUB_TOKEN }} - labels: ${{ env.PR_LABEL }} - reviewers: ${{ env.PR_REVIWER }} + # The target branch the action should deploy to. + branch: github-pages + # The folder of original branch should deploy. + folder: tmp + # target directory of target branch + target-folder: '.' From a7921c704a73578b73172faf760d1a96f204ed13 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Sat, 2 Apr 2022 12:23:15 +0800 Subject: [PATCH 16/22] ewr Signed-off-by: weizhou.lan@daocloud.io --- .github/workflows/release-chart.yaml | 88 +++++++++++++++------------- 1 file changed, 48 insertions(+), 40 deletions(-) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index 18ecbdc7..dae3d0cc 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -8,9 +8,7 @@ name: Release Charts env: HELM_VERSION: v3.8.1 - PR_LABEL: pr/release/robot_chart - PR_REVIWER: weizhoublue - MERGE_BRANCH: webserver + MERGE_BRANCH: github-pages on: workflow_dispatch: @@ -21,44 +19,32 @@ on: default: v1.0.0 jobs: - generate_chart: + # packages tgz from /charts of original branch, deploy to /charts of target branch + deploy_chart: runs-on: ubuntu-latest - strategy: - matrix: - include: - - chart_dir: charts/cilium - steps: - - name: Get Version - id: get_version + - name: Get Original Ref + id: get_origin_ref continue-on-error: false run: | if ${{ github.event_name == 'workflow_dispatch' }} ; then ver=${{ github.event.inputs.base }} - echo ::set-output name=version::${ver} + echo ::set-output name=ref::${ver} else - echo ::set-output name=version::main + echo ::set-output name=ref::main fi - name: Checkout Code uses: actions/checkout@v2 with: - ref: ${{ steps.get_version.outputs.version }} - - - name: Get Base URL - id: get_base_url - run: | - name=${{ github.repository }} - proj=${name#*/} - url=https://${{ github.repository_owner }}.github.io/${proj} - echo "::set-output name=url::${url}" + ref: ${{ steps.get_origin_ref.outputs.ref }} - name: Install Helm uses: azure/setup-helm@v2.0 with: version: ${{ env.HELM_VERSION }} - - name: Prepare Chart + - name: Package Chart continue-on-error: false run: | cd charts @@ -69,37 +55,59 @@ jobs: exit 1 fi cd .. - mkdir -p tmp/charts - mv charts/*.tgz tmp/charts - git checkout -- charts - # rebuild index.yaml - cd tmp - helm repo index ./charts --url ${{ steps.get_base_url.outputs.url }}/charts - mv ./charts/index.yaml ./ + mkdir -p tmp + mv charts/*.tgz tmp - name: Upload Chart Package uses: actions/upload-artifact@v3.0.0 with: name: chart-package - path: tmp/charts/* - retention-days: 1 - if-no-files-found: error - - - name: Upload Chart Yaml - uses: actions/upload-artifact@v3.0.0 - with: - name: chart-package - path: tmp/index.yaml + path: tmp/* retention-days: 1 if-no-files-found: error # https://github.com/marketplace/actions/deploy-to-github-pages + # 这个挺好,不需要两个分支 的 目录结构相似,可以把 一些 内容 提交到另一个仓库/目录下 + # 不需要 手动 批 PR,自动生效 + # 如果目的分支不存在,会自动创建它 - name: Deploy To GithubPages uses: JamesIves/github-pages-deploy-action@v4.2.5 with: # The target branch the action should deploy to. - branch: github-pages + branch: ${{ env.MERGE_BRANCH }} # The folder of original branch should deploy. folder: tmp # target directory of target branch + target-folder: './charts' + + # update /index.yaml in the target branch + update_yaml: + runs-on: ubuntu-latest + needs: deploy_chart + steps: + - name: Get Base URL + id: get_base_url + run: | + name=${{ github.repository }} + proj=${name#*/} + url=https://${{ github.repository_owner }}.github.io/${proj} + echo "::set-output name=url::${url}" + + - name: Checkout Code + uses: actions/checkout@v2 + with: + ref: ${{ env.MERGE_BRANCH }} + + - name: Update Chart Yaml + run: | + helm repo index ./charts --url ${{ steps.get_base_url.outputs.url }}/charts + + - name: Deploy To GithubPages + uses: JamesIves/github-pages-deploy-action@v4.2.5 + with: + # The target branch the action should deploy to. + branch: ${{ env.MERGE_BRANCH }} + # The folder of original branch should deploy. + folder: '.' + # target directory of target branch target-folder: '.' From b2b58e04015cb96eeb78275c22ba1ba6ec6673d8 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Sat, 2 Apr 2022 12:36:52 +0800 Subject: [PATCH 17/22] adsf --- .github/workflows/release-chart.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index dae3d0cc..00a6ac79 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -1,8 +1,7 @@ -# must enable github page in your project -# all charts under "charts/*", this workflow will create the tgz chart and merge to "/docs" of "chart" branch -# please make the "chart" branch as the github page -# please create the "chart" branch beforhand, or else the workflow will fail -# put all charts under /docs/charts/*.tgz, and /docs/index.yaml +# must set branch 'github-pages' as github page +# this workflow will create the tgz from "/charts/*" of branch main, +# and deploy to "/charts" of branch "github-pages" +# and on branch "github-pages", update '/index.yaml' for '/charts/*.tgz' name: Release Charts @@ -67,7 +66,7 @@ jobs: if-no-files-found: error # https://github.com/marketplace/actions/deploy-to-github-pages - # 这个挺好,不需要两个分支 的 目录结构相似,可以把 一些 内容 提交到另一个仓库/目录下 + # 这个action 用来提交PR 挺好,不需要两个分支 的 目录结构相似,可以把 一个目录 提交到某个 仓库的某个 目录下 # 不需要 手动 批 PR,自动生效 # 如果目的分支不存在,会自动创建它 - name: Deploy To GithubPages @@ -101,6 +100,7 @@ jobs: - name: Update Chart Yaml run: | helm repo index ./charts --url ${{ steps.get_base_url.outputs.url }}/charts + mv ./charts/index.yaml ./index.yaml - name: Deploy To GithubPages uses: JamesIves/github-pages-deploy-action@v4.2.5 From 0d2b67eacedf0e38beed4d1ba30dde4257a7d2a3 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Sat, 2 Apr 2022 13:38:57 +0800 Subject: [PATCH 18/22] 344r --- .github/workflows/release-chart.yaml | 64 +++++++++++++++++----------- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index 00a6ac79..5cbc03d1 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -7,6 +7,8 @@ name: Release Charts env: HELM_VERSION: v3.8.1 + PR_LABEL: pr/release/robot_chart + PR_REVIWER: weizhoublue MERGE_BRANCH: github-pages on: @@ -23,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Get Original Ref - id: get_origin_ref + id: get_original_ref continue-on-error: false run: | if ${{ github.event_name == 'workflow_dispatch' }} ; then @@ -36,7 +38,7 @@ jobs: - name: Checkout Code uses: actions/checkout@v2 with: - ref: ${{ steps.get_origin_ref.outputs.ref }} + ref: ${{ steps.get_original_ref.outputs.ref }} - name: Install Helm uses: azure/setup-helm@v2.0 @@ -57,7 +59,7 @@ jobs: mkdir -p tmp mv charts/*.tgz tmp - - name: Upload Chart Package + - name: Upload Artifact uses: actions/upload-artifact@v3.0.0 with: name: chart-package @@ -65,20 +67,6 @@ jobs: retention-days: 1 if-no-files-found: error - # https://github.com/marketplace/actions/deploy-to-github-pages - # 这个action 用来提交PR 挺好,不需要两个分支 的 目录结构相似,可以把 一个目录 提交到某个 仓库的某个 目录下 - # 不需要 手动 批 PR,自动生效 - # 如果目的分支不存在,会自动创建它 - - name: Deploy To GithubPages - uses: JamesIves/github-pages-deploy-action@v4.2.5 - with: - # The target branch the action should deploy to. - branch: ${{ env.MERGE_BRANCH }} - # The folder of original branch should deploy. - folder: tmp - # target directory of target branch - target-folder: './charts' - # update /index.yaml in the target branch update_yaml: runs-on: ubuntu-latest @@ -92,22 +80,48 @@ jobs: url=https://${{ github.repository_owner }}.github.io/${proj} echo "::set-output name=url::${url}" + - name: Get Original Ref + id: get_original_ref + run: | + if ${{ github.event_name == 'workflow_dispatch' }} ; then + ver=${{ github.event.inputs.base }} + echo ::set-output name=ref::${ver} + else + echo ::set-output name=ref::main + fi + - name: Checkout Code uses: actions/checkout@v2 with: ref: ${{ env.MERGE_BRANCH }} + - name: Download Artifact + uses: actions/download-artifact@v3.0.0 + with: + name: chart-package + path: charts/ + - name: Update Chart Yaml run: | helm repo index ./charts --url ${{ steps.get_base_url.outputs.url }}/charts mv ./charts/index.yaml ./index.yaml - - name: Deploy To GithubPages - uses: JamesIves/github-pages-deploy-action@v4.2.5 + - name: Create Pull Request + id: create_pr + uses: peter-evans/create-pull-request@v4 with: - # The target branch the action should deploy to. - branch: ${{ env.MERGE_BRANCH }} - # The folder of original branch should deploy. - folder: '.' - # target directory of target branch - target-folder: '.' + title: "robot Update chart from ${{ steps.get_original_ref.outputs.ref }} to branch ${{ env.MERGE_BRANCH }} " + # from branch + commit-message: "robot Update chart from ${{ steps.get_original_ref.outputs.ref }} to branch ${{ env.MERGE_BRANCH }} " + # branch name: ${branch}-${branch-suffix} + # an branch suffix could make sure the branch is unique + branch-suffix: timestamp + branch: robot/update_chart + # Delete the branch when closing pull requests, and when undeleted after merging + delete-branch: true + # merge to + base: ${{ env.MERGE_BRANCH }} + signoff: true + token: ${{ secrets.GITHUB_TOKEN }} + labels: ${{ env.PR_LABEL }} + reviewers: ${{ env.PR_REVIWER } From 43c46b18108bf601a7cf5d8402aa8f4563f4fc0c Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Sat, 2 Apr 2022 13:48:30 +0800 Subject: [PATCH 19/22] 344r --- .github/workflows/release-chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index 5cbc03d1..20d5d4a3 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -124,4 +124,4 @@ jobs: signoff: true token: ${{ secrets.GITHUB_TOKEN }} labels: ${{ env.PR_LABEL }} - reviewers: ${{ env.PR_REVIWER } + reviewers: ${{ env.PR_REVIWER }} From f194d61b38233794c863cf133770b806196e3e23 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Sat, 2 Apr 2022 14:09:19 +0800 Subject: [PATCH 20/22] vc --- .github/workflows/release-chart.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index 20d5d4a3..0c97d2d4 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -68,7 +68,7 @@ jobs: if-no-files-found: error # update /index.yaml in the target branch - update_yaml: + update_githubpage: runs-on: ubuntu-latest needs: deploy_chart steps: @@ -91,9 +91,10 @@ jobs: fi - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ env.MERGE_BRANCH }} + fetch-depth: 0 - name: Download Artifact uses: actions/download-artifact@v3.0.0 From 7348c4f61b14e1ee2989faeb8c2b4f74f01695d4 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Sat, 2 Apr 2022 14:12:46 +0800 Subject: [PATCH 21/22] vc --- .github/workflows/release-chart.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index 0c97d2d4..4cc6f009 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -1,6 +1,6 @@ # must set branch 'github-pages' as github page # this workflow will create the tgz from "/charts/*" of branch main, -# and deploy to "/charts" of branch "github-pages" +# and deploy to "/charts" of branch "github_pages" # and on branch "github-pages", update '/index.yaml' for '/charts/*.tgz' name: Release Charts @@ -9,7 +9,7 @@ env: HELM_VERSION: v3.8.1 PR_LABEL: pr/release/robot_chart PR_REVIWER: weizhoublue - MERGE_BRANCH: github-pages + MERGE_BRANCH: github_pages on: workflow_dispatch: @@ -94,7 +94,6 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ env.MERGE_BRANCH }} - fetch-depth: 0 - name: Download Artifact uses: actions/download-artifact@v3.0.0 From 215b142e3e1d02fb1915ba1cbbd83283f056b663 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Sat, 2 Apr 2022 14:36:00 +0800 Subject: [PATCH 22/22] sadf --- .github/workflows/release-chart.yaml | 9 ++++----- docs/contributing/development/chart.md | 6 +++--- docs/contributing/development/release.md | 8 +++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index 4cc6f009..2970bf72 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -1,7 +1,7 @@ # must set branch 'github-pages' as github page # this workflow will create the tgz from "/charts/*" of branch main, # and deploy to "/charts" of branch "github_pages" -# and on branch "github-pages", update '/index.yaml' for '/charts/*.tgz' +# and on branch "github_pages", update '/index.yaml' for '/charts/*.tgz' name: Release Charts @@ -15,18 +15,17 @@ on: workflow_dispatch: inputs: base: - description: 'Base: tag or sha' + description: 'tag, sha, branch' required: true default: v1.0.0 jobs: # packages tgz from /charts of original branch, deploy to /charts of target branch - deploy_chart: + package_chart: runs-on: ubuntu-latest steps: - name: Get Original Ref id: get_original_ref - continue-on-error: false run: | if ${{ github.event_name == 'workflow_dispatch' }} ; then ver=${{ github.event.inputs.base }} @@ -70,7 +69,7 @@ jobs: # update /index.yaml in the target branch update_githubpage: runs-on: ubuntu-latest - needs: deploy_chart + needs: package_chart steps: - name: Get Base URL id: get_base_url diff --git a/docs/contributing/development/chart.md b/docs/contributing/development/chart.md index 7fcdc19d..bc6293b3 100644 --- a/docs/contributing/development/chart.md +++ b/docs/contributing/development/chart.md @@ -1,11 +1,11 @@ # Chart Management -the '/docs' of branch 'webserver' is used by github page +the '/' of branch 'github_pages' is used as github page each version of chart package will be automatically created by CI, -they will pushed to '/docs/chart' of branch 'webserver'. +they will be pushed to '/chart' of branch 'github_pages'. -the index.yaml of chart registry will also be updated by CI, and published to '/docs' of branch 'webserver'. +the '/index.yaml' of branch 'github_pages' will also be updated by CI. so, you could use following command to get the chart diff --git a/docs/contributing/development/release.md b/docs/contributing/development/release.md index a83711e6..fef858a9 100644 --- a/docs/contributing/development/release.md +++ b/docs/contributing/development/release.md @@ -26,10 +26,12 @@ if a tag vXX.XX.XX is puhed , the following will auto trigger: ### 2 generate the changelog by historical PR with "pr/release/*" -and submit a PR commit to branch 'main', with PR label "pr/release/robot_changelog". +submit a PR commit to branch 'main', with PR label "pr/release/robot_changelog". -### 3 build the chart package with the pushed tag, and submit a PR with new chart and index.yaml to branch 'webserver' +### 3 build the chart package with the pushed tag, and submit a PR to branch 'github_pages' + +By the PR, it commits the new chart package to '/charts' and update /index.yaml on the branch 'github_pages' ### 4 create a Github Realse attached with the chart and changelog -### finnally, by hand, need approve the chart PR with label "pr/release/robot_changelog" , and changelog PR with label "pr/release/robot_changelog" +### finnally, by hand, need approve the chart PR with label "pr/release/robot_chart" , and changelog PR with label "pr/release/robot_changelog"