我已经使用以下“jx-requirements.yml”文件通过“jx boot”命令在“openshift-3.11”提供程序中安装了“Jenkins-x”。
jx-requirements.yml:
autoUpdate:
enabled: false
schedule: ""
bootConfigURL: https://github.com/jenkins-x/jenkins-x-boot-config
cluster:
clusterName: cic-60
devEnvApprovers:
- automation
environmentGitOwner: cic-60
gitKind: bitbucketserver
gitName: bs
gitServer: http://rtx-swtl-git.fnc.net.local
namespace: jx
provider: openshift
registry: docker-registry.default.svc:5000
environments:
- ingress:
domain: 172.29.96.138.nip.io
externalDNS: false
namespaceSubDomain: -jx.
tls:
email: ""
enabled: true
production: false
key: dev
repository: environment-cic-60-dev
- ingress:
domain: ""
externalDNS: false
namespaceSubDomain: ""
tls:
email: ""
enabled: true
production: false
key: staging
repository: environment-cic-60-staging
- ingress:
domain: ""
externalDNS: false
namespaceSubDomain: ""
tls:
email: ""
enabled: true
production: false
key: production
repository: environment-cic-60-production
gitops: true
ingress:
domain: 172.29.96.138.nip.io
externalDNS: false
namespaceSubDomain: -jx.
tls:
email: ""
enabled: true
production: false
kaniko: true
repository: nexus
secretStorage: local
storage:
backup:
enabled: false
url: ""
logs:
enabled: false
url: ""
reports:
enabled: false
url: ""
repository:
enabled: false
url: ""
vault: {}
velero:
schedule: ""
ttl: ""
versionStream:
ref: v1.0.568
url: https://github.com/jenkins-x/jenkins-x-versions.git
webhook: lighthouse
“jx”命名空间下的所有 pod 都已启动并正常运行。
“jx”命名空间中 Pod 的状态:
NAME READY STATUS RESTARTS AGE
jenkins-x-chartmuseum-5687695d57-pp994 1/1 Running 0 15h
jenkins-x-controllerbuild-78b4b56695-mg2vs 1/1 Running 0 15h
jenkins-x-controllerrole-765cf99bdb-swshp 1/1 Running 0 15h
jenkins-x-docker-registry-5bcd587565-rhd7q 1/1 Running 0 12h
jenkins-x-gcactivities-1598326200-zjwpj 0/1 Completed 0 53m
jenkins-x-gcactivities-1598328000-f95sr 0/1 Completed 0 23m
jenkins-x-gcpods-1598326200-k6zxg 0/1 Completed 0 53m
jenkins-x-gcpods-1598328000-dqsqn 0/1 Completed 0 23m
jenkins-x-gcpreviews-1598324400-mdp59 0/1 Completed 0 1h
jenkins-x-nexus-c7dcb47c7-fh7kx 1/1 Running 0 15h
lighthouse-foghorn-654c868bc8-d5w57 1/1 Running 0 15h
lighthouse-gc-jobs-1598324400-lh7v5 0/1 Completed 0 1h
lighthouse-gc-jobs-1598326200-dd8c9 0/1 Completed 0 53m
lighthouse-gc-jobs-1598328000-7wmf6 0/1 Completed 0 23m
lighthouse-jx-controller-6c9b8994bd-qt6tc 1/1 Running 0 15h
lighthouse-keeper-7c6fd9466f-gdjjt 1/1 Running 0 15h
lighthouse-webhooks-56668dc58b-4c52j 1/1 Running 0 15h
lighthouse-webhooks-56668dc58b-8dh27 1/1 Running 0 15h
tekton-pipelines-controller-76c8c8dd78-llj4c 1/1 Running 0 9h
tiller-7ddfd45c57-rwtt9 1/1 Running 0 15h
后来我尝试使用“jx import”命令创建一个管道,如下所示,
管道创建:
jx import --url http://rtx-swtl-git.fnc.net.local/scm/cic-60/user-interface.git --no-draft=True
该命令在“用户界面”存储库中创建了所有必要的文件(如 Dockerfile 和图表等),但在创建管道时未能在开发环境中创建拉取请求,
引发以下错误:
? Git user name: automation
Cloned Git repository from http://automation:MzI1ODg1NjA1NTk4OqjiP9N3lr4iHt9L5rofdaWMqsgW@rtx-swtl-git.fnc.net.local/scm/cic-60/user-interface.git
? Would you like to define a different preview namespace? No
Pushed Git repository to http://automation:MzI1ODg1NjA1NTk4OqjiP9N3lr4iHt9L5rofdaWMqsgW@rtx-swtl-git.fnc.net.local/scm/cic-60/user-interface.git
WARNING: Already has a webhook registered for http://hook-jx.172.29.96.138.nip.io/hook
error: failed to create Pull Request on the development environment git repository http://rtx-swtl-git.fnc.net.local/scm/cic-60/environment-cic-60-dev.git: unable to create pull request: creating git provider for https://rtx-swtl-git.fnc.net.local/scm/cic-60/user-interface.git: no Git service resource found with URL 'https://rtx-swtl-git.fnc.net.local' in namespace jx
笔记:
“jx”试图为其创建拉取请求的 git 存储库是正确的“http://rtx-swtl-git.fnc.net.local/scm/cic-60/environment-cic-60-dev.git” . 我已经手动将具有“写入”权限的“git 用户”添加到存储库,但拉取请求创建仍然失败。
Jenkins-x 版本:
Version 2.1.127
Commit 4bc05a9
Build date 2020-08-05T20:34:57Z
Go version 1.13.8
Git tree state clean
请让我知道为什么“jx”无法在适当的开发环境 git 存储库上创建拉取请求以及任何解决方法(如果存在)。