Skip to content
Open
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
32 changes: 23 additions & 9 deletions .github/workflows/auto-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ env:

jobs:
parsec_integration:
uses: deepin-community/Repository-Integration/.github/workflows/01-parsec-integration.yml@master
uses: peeweep-test/Repository-Integration/.github/workflows/01-parsec-integration.yml@master

ouput_message:
name: output integration
needs: parsec_integration
if: ${{ github.event.pull_request.head.sha }}
uses: deepin-community/Repository-Integration/.github/workflows/02-integration-output.yml@master
uses: peeweep-test/Repository-Integration/.github/workflows/02-integration-output.yml@master

build_project_prepare:
name: build project prepare
Expand All @@ -37,7 +37,7 @@ jobs:
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
Expand Down Expand Up @@ -114,6 +114,20 @@ jobs:

if ( context.issue.number != undefined ) {
while (true) {
// Get the latest information about the Pull Request
const pullRequest = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
});

// Check if the Pull Request has the '/integrate-testing' label
const hasLabel = pullRequest.data.labels.some(label => label.name === 'integrate-testing')
if (hasLabel) {
console.log(`All build commit statuses is now a success by manual`)
break
}

const { data: statuses } = await github.rest.repos.getCombinedStatusForRef({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down Expand Up @@ -166,7 +180,7 @@ jobs:
(needs.build_dde.result == 'success' || needs.build_dde.result == 'skipped') &&
(needs.build_community.result == 'success' || needs.build_community.result == 'skipped') &&
needs.wait_build_pending_status.result == 'success'
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
Expand All @@ -189,7 +203,7 @@ jobs:
- ouput_message
- build_project_prepare
- 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.create_issue_link_project.result == 'success')
Expand All @@ -207,7 +221,7 @@ jobs:
if: |
always() && !cancelled() &&
(needs.pass_integration.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:
integrations: ${{ needs.parsec_integration.outputs.all_build_task }}
Expand All @@ -222,7 +236,7 @@ jobs:
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.parsec_integration.outputs.build_matrix_main) }}
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 }}
Expand All @@ -239,7 +253,7 @@ jobs:
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.parsec_integration.outputs.build_matrix_dde) }}
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 }}
Expand All @@ -257,7 +271,7 @@ jobs:
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.parsec_integration.outputs.build_matrix_community) }}
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 }}
Expand Down
118 changes: 96 additions & 22 deletions .github/workflows/issue-project-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
default: undefined
assignees:
type: string
default: 'Zeno-sole' #多个标签有', '隔开
default: 'Zeno-sole' #多个用', '隔开
title:
type: string
default: 'Deepin Integration auto created issue!'
Expand All @@ -29,7 +29,7 @@ on:
default: 'V23-Release'
labels:
type: string
default: 'Project:integrated' #多个标签有', '隔开
default: 'Project:integrated' #多个标签用', '隔开
integrationinfo:
type: string
default: undefined
Expand Down Expand Up @@ -58,7 +58,7 @@ on:
default: undefined
assignees:
type: string
default: 'Zeno-sole' #多个标签有', '隔开
default: 'Zeno-sole' #多个用', '隔开
title:
type: string
default: 'Deepin Integration auto created issue!'
Expand All @@ -70,7 +70,7 @@ on:
default: 'V23-Beta'
labels:
type: string
default: 'Project:integrated' #多个标签有', '隔开
default: 'Project:integrated' #多个标签用', '隔开
integrationinfo:
type: string
default: "['包名 | 版本', '-- | --', 'dde-dock | [6.0.10](https://github.com/linuxdeepin/dde-dock/tree/6.0.10)']"
Expand Down Expand Up @@ -145,14 +145,9 @@ jobs:
let changelogdata = fs.readFileSync('integration-${{ github.event.number }}-changelog.md')
let changelog = changelogdata.toString()
console.log("changelog: ", changelog)
suggestion = "${{ inputs.suggestion }}"
let influencedata = fs.readFileSync('integration-${{ github.event.number }}-influence.md')
let influence = influencedata.toString()
console.log("influence: ", influence)
let testrepoaddrdata = fs.readFileSync('integration-${{ github.event.number }}-testrepoaddr.md')
let testrepoaddr = testrepoaddrdata.toString()
console.log("testrepoaddr: ", testrepoaddr)
extrainfo = "${{ inputs.extrainfo }}"

core.debug(repoinfo, labels, assignees)
if (repoinfo.length == 2) {
Expand Down Expand Up @@ -184,12 +179,6 @@ jobs:
issuse_content += testrepoaddr + "\n\n"
issuse_content += "### Changelog | 更新信息\n\n"
issuse_content += changelog + "\n\n"
issuse_content += "### Test suggestion | 测试建议\n\n"
issuse_content += suggestion + "\n\n"
issuse_content += "### Influence | 影响范围\n\n"
issuse_content += influence + "\n\n"
issuse_content += "### ADDITIONAL INFORMATION | 额外补充\n\n"
issuse_content += extrainfo + "\n"

core.debug("start create issue: ", issuse_content)

Expand Down Expand Up @@ -218,13 +207,7 @@ jobs:
issuse_content += "### Package repository address | 软件包仓库地址\n\n"
issuse_content += testrepoaddr + "\n\n"
issuse_content += "### Changelog | 更新信息\n\n"
issuse_content += changelog + "\n\n"
issuse_content += "### Test suggestion | 测试建议\n\n"
issuse_content += suggestion + "\n\n"
issuse_content += "### Influence | 影响范围\n\n"
issuse_content += influence + "\n\n"
issuse_content += "### ADDITIONAL INFORMATION | 额外补充\n\n"
issuse_content += extrainfo + "\n"
issuse_content += changelog + "\n"
core.debug("update issue body: ", issuse_content)

await github.rest.issues.update({
Expand Down Expand Up @@ -395,6 +378,97 @@ jobs:
}
}

- name: Add test information
uses: actions/github-script@v6
with:
github-token: ${{ steps.deepin-bot.outputs.app_token }}
script: |
const fs = require('fs');
const BOT_NAME = "Integration Test Info"
const COMMENT_HEAD = "**" + BOT_NAME + "**\n"
issueid = "${{ steps.issue.outputs.issueid }}"

if ( issueid != "undefined" ) {
suggestion = "${{ inputs.suggestion }}"
let influencedata = fs.readFileSync('integration-${{ github.event.number }}-influence.md')
let influence = influencedata.toString()
console.log("influence: ", influence)
extrainfo = "${{ inputs.extrainfo }}"

let COMMENT_BODY = ""
COMMENT_BODY += "### Test suggestion | 测试建议\n\n"
COMMENT_BODY += suggestion + "\n\n"
COMMENT_BODY += "### Influence | 影响范围\n\n"
COMMENT_BODY += influence + "\n\n"
COMMENT_BODY += "### ADDITIONAL INFORMATION | 额外补充\n\n"
COMMENT_BODY += extrainfo + "\n"

repoinfo = "${{ inputs.repo }}".split('/')
owner = repoinfo[0]
repo = repoinfo[1]

const response = await github.rest.issues.listComments({
owner: owner,
repo: repo,
issue_number: issueid
})
const reg = new RegExp("\\*+" + BOT_NAME + "\\*+")
BotComment= response.data.find(comment => comment.body.match(reg))
if (BotComment) {
console.log("Integration test info template added")
} else {
await github.rest.issues.createComment({
issue_number: issueid,
owner: owner,
repo: repo,
body: COMMENT_HEAD + COMMENT_BODY
})
}
}

- name: Notify the author
uses: actions/github-script@v6
with:
github-token: ${{ steps.deepin-bot.outputs.app_token }}
script: |
const BOT_NAME = "IntegrationProjector Notify the author"
const COMMENT_HEAD = "**" + BOT_NAME + "**\n"
title = "${{ inputs.title }}"
const regex = /by\s+(\w+)/
const match = title.match(regex)
const author = match ? match[1] : ''
if (author != '') {
let COMMENT_BODY = ""
COMMENT_BODY += "@" + author + ": Integrated issue updated"
issueid = "${{ steps.issue.outputs.issueid }}"
repoinfo = "${{ inputs.repo }}".split('/')
owner = repoinfo[0]
repo = repoinfo[1]

const response = await github.rest.issues.listComments({
owner: owner,
repo: repo,
issue_number: issueid
})
const reg = new RegExp("\\*+" + BOT_NAME + "\\*+")
BotComment= response.data.find(comment => comment.body.match(reg))
if (BotComment) {
await github.rest.issues.updateComment({
comment_id: BotComment.id,
owner: owner,
repo: repo,
body: COMMENT_HEAD + COMMENT_BODY
})
} else {
await github.rest.issues.createComment({
issue_number: issueid,
owner: owner,
repo: repo,
body: COMMENT_HEAD + COMMENT_BODY
})
}
}

- name: Link integration pr to issue
uses: actions/github-script@v6
with:
Expand Down
22 changes: 22 additions & 0 deletions .tools/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import requests

def get_component(repo):
print("get component")
component = "main"
if "linuxdeepin/" in repo:
component = "dde"
else:
rawurl = "https://raw.githubusercontent.com/{repo}/master/debian/deepin/workflows.yml".format(repo=repo)
res = requests.get(rawurl.replace("+", "%2B"))
if res.status_code == 200:
#print(res.content)
if "deepin:Develop:community" in str(res.content):
component = "community"
else:
print("Warn: get workflows.yml content failed!!!")
component = "community"
return component

print(get_component("deepin-community/nexttrace"))
print(get_component("linuxdeepin/nexttrace"))
print(get_component("deepin-community/xorg"))
Empty file added a
Empty file.
Empty file added a.so
Empty file.
Empty file added a.so.1
Empty file.
1 change: 1 addition & 0 deletions debian/source/include-binaries
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add