diff --git a/.github/workflows/01-parsec-intergration.yml b/.github/workflows/01-parsec-integration.yml similarity index 94% rename from .github/workflows/01-parsec-intergration.yml rename to .github/workflows/01-parsec-integration.yml index ff0ecc832..01541b292 100644 --- a/.github/workflows/01-parsec-intergration.yml +++ b/.github/workflows/01-parsec-integration.yml @@ -1,4 +1,4 @@ -name: parsec intergration +name: parsec integration on: workflow_call: @@ -39,28 +39,28 @@ on: deploy: description: deploy way AUTO or MANUALLY value: ${{ jobs.parsec_intergration.outputs.deploy }} - intergration_message: - description: intergration message at intergration.yml - value: ${{ jobs.parsec_intergration.outputs.intergration_message }} + integration_message: + description: integration message at integration.yml + value: ${{ jobs.parsec_integration.outputs.intergration_message }} component: - description: intergration repos component + description: integration repos component value: ${{ jobs.parsec_intergration.outputs.component }} intergrationinfo: - description: intergration repos list + description: integration repos list value: ${{ jobs.parsec_intergration.outputs.intergrationinfo }} changelog: - description: intergration pacakge changelog + description: integration pacakge changelog value: ${{ jobs.parsec_intergration.outputs.changelog }} influence: - description: intergration package for test influence information + description: integration package for test influence information value: ${{ jobs.parsec_intergration.outputs.influence }} milestone: - description: intergration milestone + description: integration milestone value: ${{ jobs.parsec_intergration.outputs.milestone }} jobs: parsec_intergration: - name: parsec intergration + name: parsec integration runs-on: ubuntu-latest outputs: build_matrix_0: ${{ steps.parsec_intergration.outputs.build_matrix_0 }} @@ -118,7 +118,7 @@ jobs: } def read_intergration(): - with open("intergration.yml", "r+") as intergration_file: + with open("integration.yml", "r+") as intergration_file: return yaml.load(intergration_file, Loader=yaml.BaseLoader) def check_tag_exsist(repo, tag): @@ -181,7 +181,7 @@ jobs: message = data.get("message", "") set_output("intergration_message", message) - with open("intergration-${{ github.event.number }}-detail.md", "w+") as intergration_detail: + with open("integration-${{ github.event.number }}-detail.md", "w+") as intergration_detail: intergration_detail.write(message) intergrationInfos = ["包名 | 版本", "-- | --"] @@ -263,7 +263,7 @@ jobs: } if ( illegal_repos !== undefined ) { - COMMENT_BODY += "Listed repos are not allowed by automatic intergration: \n|repo|\n|-|\n" + COMMENT_BODY += "Listed repos are not allowed by automatic integration: \n|repo|\n|-|\n" illegal_repos.forEach(repo => { COMMENT_BODY += "|" + repo + "|\n" }) @@ -379,8 +379,8 @@ jobs: //console.log(component) core.setOutput('component', component) - - name: upload intergration detail + - name: upload integration detail uses: actions/upload-artifact@v2 with: - name: intergration-${{ github.event.number }}-detail.md - path: intergration-${{ github.event.number }}-detail.md + name: integration-${{ github.event.number }}-detail.md + path: integration-${{ github.event.number }}-detail.md diff --git a/.github/workflows/02-build-obs.yml b/.github/workflows/02-build-obs.yml index 1b3d64978..e91d0e7e5 100644 --- a/.github/workflows/02-build-obs.yml +++ b/.github/workflows/02-build-obs.yml @@ -69,7 +69,7 @@ jobs: fi echo "component=$component" >> $GITHUB_OUTPUT - - name: obs intergration topic project prepare + - name: obs integration topic project prepare run: | set +e set -x diff --git a/.github/workflows/02-intergration-output.yml b/.github/workflows/02-integration-output.yml similarity index 86% rename from .github/workflows/02-intergration-output.yml rename to .github/workflows/02-integration-output.yml index 8761d17c0..387dac443 100644 --- a/.github/workflows/02-intergration-output.yml +++ b/.github/workflows/02-integration-output.yml @@ -9,10 +9,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: download intergration detail + - name: download integration detail uses: actions/download-artifact@v2 with: - name: intergration-${{ github.event.number }}-detail.md + name: integration-${{ github.event.number }}-detail.md - name: create comment uses: actions/github-script@v6 @@ -20,12 +20,12 @@ jobs: github-token: ${{ github.token }} script: | const fs = require('fs'); - let rawdata = fs.readFileSync('intergration-${{ github.event.number }}-detail.md'); + let rawdata = fs.readFileSync('integration-${{ github.event.number }}-detail.md'); let message = rawdata.toString(); if (message.includes("CVE")) { message += "\n @deepin-community/ci CVE detected\n" } - const BOT_NAME = "INTERGRATION Bot" + const BOT_NAME = "INTEGRATION Bot" const COMMENT_HEAD = "**" + BOT_NAME + "**\n\n" const COMMENT_BODY = "Integration Details: " + message const response = await github.rest.issues.listComments({ diff --git a/.github/workflows/06-deployed.yml b/.github/workflows/06-deployed.yml index 0064ac98b..cc0d6e525 100644 --- a/.github/workflows/06-deployed.yml +++ b/.github/workflows/06-deployed.yml @@ -3,7 +3,7 @@ name: deployed feedback on: workflow_call: inputs: - intergrations: + integrations: required: true type: string @@ -22,7 +22,7 @@ jobs: id: get-token uses: actions/github-script@v6 env: - APP_ID: 229710 + APP_ID: ${{ secrets.APP_ID }} APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} with: script: | @@ -51,7 +51,7 @@ jobs: github-token: ${{ steps.get-token.outputs.app_token }} script: | const yaml = require('js-yaml'); - const newIntergrated = ${{ inputs.intergrations }} + const newIntergrated = ${{ inputs.integrations }} const {data} = await github.rest.repos.getContent({ owner: context.repo.owner, repo: context.repo.repo, diff --git a/.github/workflows/07-sync-intergration-info.yml b/.github/workflows/07-sync-integration-info.yml similarity index 99% rename from .github/workflows/07-sync-intergration-info.yml rename to .github/workflows/07-sync-integration-info.yml index 0e0cdef0e..b654d4137 100644 --- a/.github/workflows/07-sync-intergration-info.yml +++ b/.github/workflows/07-sync-integration-info.yml @@ -19,7 +19,7 @@ jobs: id: get-token uses: actions/github-script@v6 env: - APP_ID: 229710 + APP_ID: 164400 APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} with: script: | diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 3e5a4ed74..f77854605 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -1,17 +1,17 @@ # 集成工作说明 总体框架 -auto-intergration.yml +auto-integration.yml 总体顺序 parsec_intergration -> build -> auto test -> merge topic -> update record -> close pr 构建时更具自定义的优先级,相同优先级并发构建,不同优先级先后构建.当前一共提供了10个优先级. -01-parsec-intergration.yml +01-parsec-integration.yml 为解析集成工作流 主要为对intergration.yml文件的解析,检查并提取集成仓库,tag以及构建顺序.提取集成说明并生成md artifact. -02-intergration-output.yml +02-integration-output.yml 与build并行运行,主要根据上面的解析结果输出相关信息到pr中, 02-build-jenkins.yml @@ -27,7 +27,7 @@ parsec_intergration -> build -> auto test -> merge topic -> update record -> clo 06-deployed.yml 更新记录并标记此集成已被集成,并关闭pr -07-sync-intergration-info.yml +07-sync-integration-info.yml 处理pr评论中包含的集成信息,格式列子如下: repo: linuxdeepin/deepin-system-monitor diff --git a/.github/workflows/auto-intergration.yml b/.github/workflows/auto-integration.yml similarity index 82% rename from .github/workflows/auto-intergration.yml rename to .github/workflows/auto-integration.yml index ef82f62e4..5521ad6cd 100644 --- a/.github/workflows/auto-intergration.yml +++ b/.github/workflows/auto-integration.yml @@ -1,9 +1,9 @@ -name: intergration-request +name: integration-request on: #[push] pull_request_target: paths: - - "intergration.yml" + - "integration.yml" types: [ opened, synchronize ] concurrency: @@ -11,18 +11,18 @@ concurrency: cancel-in-progress: true env: - TOPIC: test-intergration-pr-${{ github.event.number }} + TOPIC: test-integration-pr-${{ github.event.number }} OSCPASS: ${{ secrets.OSCPASS }} jobs: parsec_intergration: - uses: deepin-community/Repository-Integration/.github/workflows/01-parsec-intergration.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/01-parsec-integration.yml@master ouput_message: - name: output intergration + name: output integration needs: parsec_intergration if: ${{ github.event.pull_request.head.sha }} - uses: deepin-community/Repository-Integration/.github/workflows/02-intergration-output.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/02-integration-output.yml@master build_project_prepare: name: build project prepare @@ -31,13 +31,13 @@ jobs: issueid: ${{ steps.find-comments.outputs.issueid }} projectItemID: ${{ steps.find-comments.outputs.projectItemID }} steps: - - name: obs intergration topic project prepare + - name: obs integration topic project prepare run: | set +e set -x result=$(curl -u golf66:$OSCPASS "https://build.deepin.com/source/deepin:CI:TestingIntegration:$TOPIC/_meta"|grep "unknown_project") if [ "$result" != "" ];then - curl -o meta.xml https://raw.githubusercontent.com/deepin-community/Repository-Integration/master/.github/workflows/obs-proj-meta.tpl + curl -o meta.xml https://raw.githubusercontent.com/peeweep-test/Repository-Integration/master/.github/workflows/obs-proj-meta.tpl sed -i "s#TOPIC#${TOPIC}#g" meta.xml curl -X PUT -u golf66:$OSCPASS -H "Content-type: text/xml" -d @meta.xml "https://build.deepin.com/source/deepin:CI:TestingIntegration:$TOPIC/_meta" fi @@ -105,7 +105,7 @@ jobs: (needs.build-order-7.result == 'success' || needs.build-order-7.result == 'skipped') && (needs.build-order-8.result == 'success' || needs.build-order-8.result == 'skipped') && (needs.build-order-9.result == 'success' || needs.build-order-9.result == 'skipped') - uses: deepin-community/Repository-Integration/.github/workflows/issue-project-manager.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/issue-project-manager.yml@master secrets: inherit with: repo: linuxdeepin/developer-center @@ -119,7 +119,7 @@ jobs: intergrationinfo: ${{ needs.parsec_intergration.outputs.intergrationinfo }} changelog: ${{ needs.parsec_intergration.outputs.changelog }} influence: ${{ needs.parsec_intergration.outputs.influence }} - testrepoaddr: " deb [trusted=yes] https://ci.deepin.com/repo/obs/deepin:/CI:/TestingIntegration:/test-intergration-pr-${{ github.event.number }}/testing/ ./" + testrepoaddr: " deb [trusted=yes] https://ci.deepin.com/repo/obs/deepin:/CI:/TestingIntegration:/test-integration-pr-${{ github.event.number }}/testing/ ./" # https://github.com/actions/runner/issues/491#issuecomment-850884422 reason why use this if # :( for this @@ -141,7 +141,7 @@ jobs: - build-order-8 - build-order-9 - create_issue_link_project - uses: deepin-community/Repository-Integration/.github/workflows/04-auto-test.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/04-auto-test.yml@master if: | always() && !cancelled() && (needs.parsec_intergration.result == 'success') && (needs.ouput_message.result != 'failure' ) && @@ -156,7 +156,7 @@ jobs: (needs.build-order-8.result == 'success' || needs.build-order-8.result == 'skipped') && (needs.build-order-9.result == 'success' || needs.build-order-9.result == 'skipped') with: - topic: test-intergration-pr-${{ github.event.number }} + topic: test-integration-pr-${{ github.event.number }} packages: ${{ needs.parsec_intergration.outputs.all_build_task }} deploy: ${{ needs.parsec_intergration.outputs.deploy }} @@ -177,7 +177,7 @@ jobs: - build-order-8 - build-order-9 - auto-test - uses: deepin-community/Repository-Integration/.github/workflows/05-merge-into-testing.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/05-merge-into-testing.yml@master secrets: inherit if: | always() && !cancelled() && @@ -194,7 +194,7 @@ jobs: (needs.build-order-9.result == 'success' || needs.build-order-9.result == 'skipped') && (needs.auto-test.result == 'success') with: - topic: test-intergration-pr-${{ github.event.number }} + topic: test-integration-pr-${{ github.event.number }} deploy: "TestingRepoReviewer" component: ${{ needs.parsec_intergration.outputs.component }} message: ${{ needs.parsec_intergration.outputs.intergration_message }} @@ -206,10 +206,10 @@ jobs: - deploy-repo - parsec_intergration if: always() && !cancelled() && (needs.deploy-repo.result == 'success') - uses: deepin-community/Repository-Integration/.github/workflows/06-deployed.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/06-deployed.yml@master secrets: inherit with: - intergrations: ${{ needs.parsec_intergration.outputs.all_build_task }} + integrations: ${{ needs.parsec_intergration.outputs.all_build_task }} # ten level build task build-order-0: @@ -221,13 +221,13 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.parsec_intergration.outputs.build_matrix_0) }} - uses: deepin-community/Repository-Integration/.github/workflows/02-build-obs.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/02-build-obs.yml@master secrets: inherit with: repo: ${{ matrix.payload.repo }} tag: ${{ matrix.payload.tag }} tagsha: ${{ matrix.payload.tagsha }} - topic: test-intergration-pr-${{ github.event.number }} + topic: test-integration-pr-${{ github.event.number }} build-order-1: if: always() && !cancelled() && (needs.parsec_intergration.outputs.build_matrix_1 != '') && (needs.parsec_intergration.result == 'success') @@ -237,13 +237,13 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.parsec_intergration.outputs.build_matrix_1) }} - uses: deepin-community/Repository-Integration/.github/workflows/02-build-obs.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/02-build-obs.yml@master secrets: inherit with: repo: ${{ matrix.payload.repo }} tag: ${{ matrix.payload.tag }} tagsha: ${{ matrix.payload.tagsha }} - topic: test-intergration-pr-${{ github.event.number }} + topic: test-integration-pr-${{ github.event.number }} build-order-2: if: always() && !cancelled() && ( needs.parsec_intergration.outputs.build_matrix_2 != '') && (needs.parsec_intergration.result == 'success') @@ -253,13 +253,13 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.parsec_intergration.outputs.build_matrix_2) }} - uses: deepin-community/Repository-Integration/.github/workflows/02-build-obs.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/02-build-obs.yml@master secrets: inherit with: repo: ${{ matrix.payload.repo }} tag: ${{ matrix.payload.tag }} tagsha: ${{ matrix.payload.tagsha }} - topic: test-intergration-pr-${{ github.event.number }} + topic: test-integration-pr-${{ github.event.number }} build-order-3: if: always() && !cancelled() && ( needs.parsec_intergration.outputs.build_matrix_3 != '') && (needs.parsec_intergration.result == 'success') @@ -269,13 +269,13 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.parsec_intergration.outputs.build_matrix_3) }} - uses: deepin-community/Repository-Integration/.github/workflows/02-build-obs.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/02-build-obs.yml@master secrets: inherit with: repo: ${{ matrix.payload.repo }} tag: ${{ matrix.payload.tag }} tagsha: ${{ matrix.payload.tagsha }} - topic: test-intergration-pr-${{ github.event.number }} + topic: test-integration-pr-${{ github.event.number }} build-order-4: if: always() && !cancelled() && ( needs.parsec_intergration.outputs.build_matrix_4 != '') && (needs.parsec_intergration.result == 'success') @@ -285,13 +285,13 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.parsec_intergration.outputs.build_matrix_4) }} - uses: deepin-community/Repository-Integration/.github/workflows/02-build-obs.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/02-build-obs.yml@master secrets: inherit with: repo: ${{ matrix.payload.repo }} tag: ${{ matrix.payload.tag }} tagsha: ${{ matrix.payload.tagsha }} - topic: test-intergration-pr-${{ github.event.number }} + topic: test-integration-pr-${{ github.event.number }} build-order-5: name: build-order-5 @@ -302,13 +302,13 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.parsec_intergration.outputs.build_matrix_5) }} - uses: deepin-community/Repository-Integration/.github/workflows/02-build-obs.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/02-build-obs.yml@master secrets: inherit with: repo: ${{ matrix.payload.repo }} tag: ${{ matrix.payload.tag }} tagsha: ${{ matrix.payload.tagsha }} - topic: test-intergration-pr-${{ github.event.number }} + topic: test-integration-pr-${{ github.event.number }} build-order-6: if: always() && !cancelled() && ( needs.parsec_intergration.outputs.build_matrix_6 != '') && (needs.parsec_intergration.result == 'success') @@ -318,13 +318,13 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.parsec_intergration.outputs.build_matrix_6) }} - uses: deepin-community/Repository-Integration/.github/workflows/02-build-obs.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/02-build-obs.yml@master secrets: inherit with: repo: ${{ matrix.payload.repo }} tag: ${{ matrix.payload.tag }} tagsha: ${{ matrix.payload.tagsha }} - topic: test-intergration-pr-${{ github.event.number }} + topic: test-integration-pr-${{ github.event.number }} build-order-7: if: always() && !cancelled() && ( needs.parsec_intergration.outputs.build_matrix_7 != '') && (needs.parsec_intergration.result == 'success') @@ -334,13 +334,13 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.parsec_intergration.outputs.build_matrix_7) }} - uses: deepin-community/Repository-Integration/.github/workflows/02-build-obs.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/02-build-obs.yml@master secrets: inherit with: repo: ${{ matrix.payload.repo }} tag: ${{ matrix.payload.tag }} tagsha: ${{ matrix.payload.tagsha }} - topic: test-intergration-pr-${{ github.event.number }} + topic: test-integration-pr-${{ github.event.number }} build-order-8: if: always() && !cancelled() && ( needs.parsec_intergration.outputs.build_matrix_8 != '') && (needs.parsec_intergration.result == 'success') @@ -350,13 +350,13 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.parsec_intergration.outputs.build_matrix_8) }} - uses: deepin-community/Repository-Integration/.github/workflows/02-build-obs.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/02-build-obs.yml@master secrets: inherit with: repo: ${{ matrix.payload.repo }} tag: ${{ matrix.payload.tag }} tagsha: ${{ matrix.payload.tagsha }} - topic: test-intergration-pr-${{ github.event.number }} + topic: test-integration-pr-${{ github.event.number }} build-order-9: if: always() && !cancelled() && ( needs.parsec_intergration.outputs.build_matrix_9 != '') && (needs.parsec_intergration.result == 'success') @@ -366,10 +366,10 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.parsec_intergration.outputs.build_matrix_9) }} - uses: deepin-community/Repository-Integration/.github/workflows/02-build-obs.yml@master + uses: peeweep-test/Repository-Integration/.github/workflows/02-build-obs.yml@master secrets: inherit with: repo: ${{ matrix.payload.repo }} tag: ${{ matrix.payload.tag }} tagsha: ${{ matrix.payload.tagsha }} - topic: test-intergration-pr-${{ github.event.number }} + topic: test-integration-pr-${{ github.event.number }} diff --git a/.github/workflows/issue-project-manager.yml b/.github/workflows/issue-project-manager.yml index 05f1df503..b122781c9 100644 --- a/.github/workflows/issue-project-manager.yml +++ b/.github/workflows/issue-project-manager.yml @@ -308,7 +308,7 @@ jobs: echo 'ITEM_ID='$item_id >> $GITHUB_ENV fi - - name: Set fields(intergration status) + - name: Set fields(integration status) env: GITHUB_TOKEN: ${{ steps.deepin-bot.outputs.app_token }} run: | @@ -334,7 +334,7 @@ jobs: } }' -f project=$PROJECT_ID -f item=${{ env.ITEM_ID }} -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.OPTION_ID }} --silent - - name: Link issue to intergration pr + - name: Link issue to integration pr uses: actions/github-script@v6 with: github-token: ${{ github.token }} @@ -373,7 +373,7 @@ jobs: } } - - name: Link intergration pr to issue + - name: Link integration pr to issue uses: actions/github-script@v6 with: github-token: ${{ steps.deepin-bot.outputs.app_token }} @@ -387,7 +387,7 @@ jobs: let COMMENT_BODY = "" COMMENT_BODY += "Deepin Testing Integration Project Manager Info\n" - COMMENT_BODY += "Link to https://github.com/deepin-community/Repository-Integration/pull/" + context.issue.number + "\n" + COMMENT_BODY += "Link to https://github.com/" + context.issue.owner +"/Repository-Integration/pull/" + context.issue.number + "\n" if ( issueid != "undefined" ) { const response = await github.rest.issues.listComments({ diff --git a/integration.yml b/integration.yml new file mode 100644 index 000000000..febba49fd --- /dev/null +++ b/integration.yml @@ -0,0 +1,8 @@ +message: | + Integrated dde-printer +milestone: V23-Beta +repos: + - repo: linuxdeepin/dde-printer + tag: 0.9.19 + order: 0 + tagsha: \ No newline at end of file diff --git a/intergration.yml b/intergration.yml deleted file mode 100644 index 0e614da93..000000000 --- a/intergration.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Required -message: | - Integrated for 23 V23-Bata -# Not required, now default is V23-Beta -milestone: V23-Beta -# Required -repos: - # Required - - repo: linuxdeepin/examplerepo - # Not required - tag: 5.11.22 - # Not required - order: 0 - # Not required, but need one of tag and tagsha info - # When use tag info, intergration workflow will check repository tag and build tag version - # When use tagsha info, interation workflow will build tagsha version, It doesn't matter whether the tag exists. - tagsha: "********************************"