deepin-community / infra-settings

deepin cicd infrastructure config settings
GNU General Public License v3.0
2 stars 9 forks source link

prow: add readme.md file for ci check #160

Closed kuchune closed 1 month ago

kuchune commented 2 months ago

增加prow-ci检查说明文档readme.md

deepin-ci-robot commented 2 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign xzl01 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/deepin-community/infra-settings/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
deepin-ci-robot commented 2 months ago

Hi @kuchune. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
hudeng-go commented 2 months ago

/ok-to-test

hudeng-go commented 2 months ago

@kuchune 评论信息里面需要带上对应检查任务的readme.

hudeng-go commented 2 months ago

/cc @UTsweetyfish

UTsweetyfish commented 2 months ago

api-check/Dockerfile

三个 ADD 没有看到文件 图片

api-check/entrypoint.sh

这个 cp 是做什么的 图片

deepin-abigail 和 fastFilesCompare.json 不存在 图片

debian-check/Dockerfile

postAction.py 不存在 图片

debian-check/entrypoint

  1. exSuffLstForKeys unused
  2. exProjectLstForEnvKeys unused
  3. 为什么要做 keyJson 的检查?
  4. postStep 的 assign 应该为 sysdev

debian-check/readme.md

按照系统部要求,PR变更文件中不能出现"getcap,setcap,lshw,dmidecode,export,unset"的命令敏感词,如果检测匹配到对应的敏感词则显示该错误信息。

这个要求是哪里来的?

static-check/Dockerfile

tools 目录和 postAction.py 文件不存在

图片

tscancode 是什么?为什么要从 ci.uniontech.com 下载?是否可以在容器构建时编译安装?

cppcheck-2.8 版本是有限定要求吗?是否可以直接从 alpine 源安装?(apk add cppcheck)

gosec 是否可以从 alpine 源安装?(apk add)

golangci-lint 是否可以从 alpine 源安装?(apk add)

static-check/entrypoint.sh

该检查对 C/C++ 进行了 cppcheck, tscancode,对 Go 项目进行了 Gosec 和 golangci-lint,对所有项目进行了 shellcheck

这个检查建议只在自研项目下进行,建议不对 deepin-community/* 下项目进行检查

kuchune commented 1 month ago

@kuchune 评论信息里面需要带上对应检查任务的readme.

每大的检查中包括几个子检查,我把readme的链接放在大的检查名字上了 image

kuchune commented 1 month ago

@UTsweetyfish 缺少的文件已经补充上传

kuchune commented 1 month ago

为什么要做 keyJson 的检查?

这个属于敏感词检查,是之前gerrit中赖总这边提出的,后面增加了其他的敏感词检查,后续预计还会增加其他的敏感词检查, 参见工单:https://cooperation.uniontech.com/app/1c4062ac-cc50-4f6c-9d7d-52906b78a291/637ae9a3e01ebec272540da5/637ae9a3e01ebec272540ec1/row/071e5ab1-f0ae-44a2-9867-b501d895377b

kuchune commented 1 month ago

tscancode 是什么?为什么要从 ci.uniontech.com 下载?是否可以在容器构建时编译安装? cppcheck-2.8 版本是有限定要求吗?是否可以直接从 alpine 源安装?(apk add cppcheck) gosec 是否可以从 alpine 源安装?(apk add) golangci-lint 是否可以从 alpine 源安装?(apk add)

@UTsweetyfish 上述工具在gerri检查中一直在使用,使用已经安装的工具,可以基本保证检查稳定运行,而不出现其他异常,后续如果验证直接安装也可以稳定运行,可以优化

UTsweetyfish commented 1 month ago
  1. deepin-abigail 没有源码
  2. api-check/entrypoint.sh 里面有个 cp debian/patches 是做什么的
  3. postAction.py 怎么放到 /go/ 里去了 图片
  4. 按照工单,dmidecode lshw 的关键字拦截是否应该是只在自研项目下进行?
  5. 如果能的话 cppcheck gosec golangci-lint 还是请使用 apk add 从源进行安装
  6. tscancode 为什么要从 ci.uniontech.com 下载?是否可以在容器构建时编译安装?
  7. 相当多的检查在 deepin-community 下是不应被启用的,请缩减检查范围
kuchune commented 1 month ago
  1. deepin-abigail 没有源码
  2. api-check/entrypoint.sh 里面有个 cp debian/patches 是做什么的
  3. postAction.py 怎么放到 /go/ 里去了 图片
  4. 按照工单,dmidecode lshw 的关键字拦截是否应该是只在自研项目下进行?
  5. 如果能的话 cppcheck gosec golangci-lint 还是请使用 apk add 从源进行安装
  6. tscancode 为什么要从 ci.uniontech.com 下载?是否可以在容器构建时编译安装?
  7. 相当多的检查在 deepin-community 下是不应被启用的,请缩减检查范围
  1. deepin-abigail 这个工具我们这边也只拿到二进制文件,没有源码
  2. 这个是api接口检查逻辑,结合下个命令quilt push -a看,是应用补丁
  3. 因为使用postAction.py的运行目录是/go/latestCodeDir, entrypoint.sh里面用的也是cp ../postAction.py .,应该没有影响
  4. 这个我只是服从任务安排,如果只能在自研项目下进行,请联系赖总和郭斐沟通
  5. 后续验证可以的话会改进
  6. tscancode的源码中提供有二进制文件,这里只是为了在内网运行下载方便
  7. 请列出在deepin-community不应被启用的检查,我们这边需要讨论汇报给赖总决定
UTsweetyfish commented 1 month ago
  1. 这个是api接口检查逻辑,结合下个命令quilt push -a看,是应用补丁

这个最好用 QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null push -a 来做,不需要 cp

或者直接用 dh_quilt_patch 命令

kuchune commented 1 month ago

2. QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null push -a

@UTsweetyfish 好的,我这边改一下