WwjwK零S
流水线是跑在member集群上,界面给出的链接是host集群的:
原本想通过上图所示链接触发流水线,但报错:
但是,我换成member集群的域名就能成功触发,这是bug 吗?还是设计如此?
流水线是跑在member集群上,界面给出的链接是host集群的:
原本想通过上图所示链接触发流水线,但报错:
但是,我换成member集群的域名就能成功触发,这是bug 吗?还是设计如此?
你上面的第一个图,访问的时候是host
host集群吗?
这个看起来是个缺陷,没有考虑到多集群的情况。我找到了对应的代码:
` get webhookUrl() {
const { formTemplate } = this.props
const url = get(formTemplate, `${this.scmPrefix}.url`, '')
const api_uri = get(formTemplate, `${this.scmPrefix}.api_uri`, '')
const owner = get(formTemplate, `${this.scmPrefix}.owner`, '')
const repo = get(formTemplate, `${this.scmPrefix}.repo`, '')
const bitbucket_url = `${api_uri}/scm/${owner}/${repo}.git`
switch (this.sourceType) {
case 'bitbucket_server':
return `${window.location.protocol}//${window.location.host}/devops_webhook/git/?url=${bitbucket_url}`
case 'github':
return `${window.location.protocol}//${window.location.host}/devops_webhook/${this.sourceType}/`
default:
return `${window.location.protocol}//${window.location.host}/devops_webhook/git/?url=${url}`
}
}
我的理解是,上面的那个链接只是一个提示,还是需要在代码仓库中配置webhook地址的。如果是这样的话,那么这个问题不大了。就只是让人容易产生误解。
为了方便大家对这个问题的修复进度的跟踪,我创建了一个issues。大家可以订阅(subscribe)这个issues。
另外,如果你认为我的回答已经解决了你的疑惑(没有解决问题)的话,可以把当前帖子标记为已结束。
3.3 后请参考下面的文档来使用 webhook 功能
https://github.com/kubesphere/ks-devops/blob/master/docs/webhook.md
3.2.1的webhook地址有点儿问题。应该是 member集群主节点的地址;非kubesphere所在服务器的地址。-这个问题纠结了我好几天