Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dde-printer #59

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: parsec intergration
name: parsec integration

on:
workflow_call:
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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 = ["包名 | 版本", "-- | --"]
Expand Down Expand Up @@ -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"
})
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/02-build-obs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ 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
with:
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({
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/06-deployed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: deployed feedback
on:
workflow_call:
inputs:
intergrations:
integrations:
required: true
type: string

Expand All @@ -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: |
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
Loading