pipecd
pipecd copied to clipboard
Bitbucket links under deployment are broken
What happened: I deployed a test deployment with a pod, service and ingress (could be anything), when I then press on the configured deployment and press on the following buttons: Latest deployment more details - it redirects me to a broken bitbucket url Configuration Directory config (icon) - redirects me to a broken bitbucket url
What you expected to happen: When pressing more details i am redirected to the commit that was used to deploy the files. When pressing config showing me the config file content.
How to reproduce it:
- Deploy PipeCD with Bitbucket (in our case on-prem),
- Connect a PipeD to PipeCD
- Make a deployment within the PipeCD UI
- Press the buttons within the deployment text statuses
- Get redirected to invalid bitbucket urls
Environment:
-
piped
version: Chart: 0.15.2 -
control-plane
version: Chart: 0.15.1 - Others: Bitbucket Server (On prem)
Nice catch, we have not handled the case of on-prem bitbucket server is set as repo host for now.
switch u.Host {
case "github.com", "gitlab.com":
subPath = "commit"
case "bitbucket.org":
subPath = "commits"
default:
// TODO: Allow users to specify git host
// Currently, the same subPath as Github is applied for all of unsupported hosts,
// to support GHE where its host could be customized
subPath = "commit"
}
ref: https://github.com/pipe-cd/pipe/blob/master/pkg/git/url.go#L40-L50