JenkinsScan Organization Folder Log
看起来像这样:
Started by user Obay Abdelagdir
[Thu Dec 31 16:45:21 UTC 2020] Starting organization scan...
[Thu Dec 31 16:45:21 UTC 2020] Updating actions...
Looking up details of my-org-name...
Organization URL: https://github.com/my-org-name
[Thu Dec 31 16:45:22 UTC 2020] Consulting GitHub Organization
Connecting to https://api.github.com using 94421/****** (Github App, necessary for publishing checks)
Looking up repositories of organization my-org-name
0 repositories were processed
[Thu Dec 31 16:45:23 UTC 2020] Finished organization scan. Scan took 1.3 sec
Finished: SUCCESS
Jenkins"Github组织文件夹";详细信息:我试图按照这里的说明,但没有安装";Github应用程序;到组织(安装在用户上(,并且我忽略了Configuration as Code Plugin
部分。
Github应用程序详细信息:";Github应用程序;是由一个普通的github用户创建的,它安装在对组织具有所有者权限的用户上。因为我无法直接在组织上安装它编辑:我能够将应用程序的所有权转移到组织并安装它,但同样的问题仍然存在。
我的问题:上面的日志中说0 repositories were processed
。但我在组织中有一个分支,它有一个名为.jenkinsfile
的文件(是的,我将其添加到"项目识别器"中(,其中包含以下内容:
pipeline {
stages {
stage('Static Code Analysis') {
parallel {
stage('Pylint') {
agent {
label "pylint"
}
steps {
sh "pylint --exit-zero --load-plugins=pylint_odoo 0-e odoolint --rcfile=./.pylintrc * > pylint.log"
}
}
}
}
}
}
另一个问题是github检查不起作用,它在构建日志中给出了以下信息:
[GitHub Checks] Failed Publishing GitHub checks: org.kohsuke.github.GHFileNotFoundException: https://api.github.com/repos/my-org-name/my-repo {"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#get-a-repository"}
[GitHub Checks] Failed Publishing GitHub checks: org.kohsuke.github.GHFileNotFoundException: https://api.github.com/repos/my-org-name/my-repo {"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#get-a-repository"}
Finished: SUCCESS
回答我自己的问题。
github应用程序必须安装在组织上。最好(也许也是唯一(的方法如下:
- 使用您的普通用户帐户登录
- 打开组织url,https://github.com/YOUR-ORG-NAME
- 打开"
Settings
"选项卡,单击"Developer settings
"> - 在
Developer settings
下应该有两个选项OAuth Apps
和Github Apps
,点击Github Apps
- 然后按照插件文档中的说明进行操作
- 最后确保在组织中安装应用程序