-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when parsing Git URL on Bitbucket Server #6828
Comments
So I believe that the problem is not that we're trimming |
Still reproducible on jx version 2.0.1240. Interestingly enough I tried jx import of an existing |
Hello, I retried today with the jx version It is working with Traditional Jenkins ( If it could help, here is an error that is shown in the command
|
Just tried this with 2.1.31 and it's still failing. Getting the sourcerepository resource, cloneUrl is still missing scm. Tried this with |
I found some functions in the code that could be related to this issue. Lines 28 to 31 in 22ce213
calls this function Lines 42 to 49 in 22ce213
but it doesn't add the |
Nicely spotted @AntoineFr, meanwhile I am using a bit of kubectl and scripting to workaround it
Edit: although I have to say that the first meta-pipeline will fail anyway because it will start before I can possibly update that resource. In fact it fails while upserting the Pipeline resource and a bit of digging brought me here: Lines 433 to 438 in a0d4c5a
|
I'm not 100% sure of this one - I had to copy some logic into `pkg/tekton/pipelines.go` from `pkg/cmd/opts/git.go`, which I didn't care for, and I am not entirely certain that what I have changed is what needed to be changed. I'll be able to verify tomorrow on our test BitBucket Server instance, hopefully. fixes jenkins-x#6828 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
I'm hoping #7173 deals with this, but I'm going to test it against BitBucket Server tomorrow. The challenge is that we can generate the |
I'm not 100% sure of this one - I had to copy some logic into `pkg/tekton/pipelines.go` from `pkg/cmd/opts/git.go`, which I didn't care for, and I am not entirely certain that what I have changed is what needed to be changed. I'll be able to verify tomorrow on our test BitBucket Server instance, hopefully. fixes jenkins-x#6828 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
I'm not 100% sure of this one - I had to copy some logic into `pkg/tekton/pipelines.go` from `pkg/cmd/opts/git.go`, which I didn't care for, and I am not entirely certain that what I have changed is what needed to be changed. I'll be able to verify tomorrow on our test BitBucket Server instance, hopefully. fixes jenkins-x#6828 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
I'm not 100% sure of this one - I had to copy some logic into `pkg/tekton/pipelines.go` from `pkg/cmd/opts/git.go`, which I didn't care for, and I am not entirely certain that what I have changed is what needed to be changed. I'll be able to verify tomorrow on our test BitBucket Server instance, hopefully. fixes jenkins-x#6828 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
I'm not 100% sure of this one - I had to copy some logic into `pkg/tekton/pipelines.go` from `pkg/cmd/opts/git.go`, which I didn't care for, and I am not entirely certain that what I have changed is what needed to be changed. I'll be able to verify tomorrow on our test BitBucket Server instance, hopefully. fixes jenkins-x#6828 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
I'm not 100% sure of this one - I had to copy some logic into `pkg/tekton/pipelines.go` from `pkg/cmd/opts/git.go`, which I didn't care for, and I am not entirely certain that what I have changed is what needed to be changed. I'll be able to verify tomorrow on our test BitBucket Server instance, hopefully. fixes #6828 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Summary
Some commands like
jx import
orjx create devpod
need to clone a Git repo in order to work.If you use Bitbucket Server, this repo URL isn't parsed correctly in this step.
In the Bitbucket web interface, the clone URL is something like
https://git.***.fr/scm/<PROJECT>/<REPO>.git
.These commands are failing because they don't have the right clone URL (it is missing the
/scm
part) :fatal: repository 'https://git.***.fr/<PROJECT>/<REPO>.git/' not found
.I think it is related to this line in the code :
jx/pkg/gits/git_url.go
Lines 203 to 204 in 1976d34
Steps to reproduce the behavior
I tested these cases : install Jenkins X with Bitbucket Server and either :
jx create devpod
jx import
withwebhook: lighthouse
Expected behavior
The repository is correctly cloned.
Actual behavior
It fails with an error like
Jx version
The output of
jx version
is:Jenkins type
Kubernetes cluster
On premise
Operating system / Environment
The text was updated successfully, but these errors were encountered: