Skip to content
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

Gitlab with context path /gitlab - Commit url - 404 #1634

Open
m-dinesh-kumar opened this issue Feb 23, 2024 · 2 comments
Open

Gitlab with context path /gitlab - Commit url - 404 #1634

m-dinesh-kumar opened this issue Feb 23, 2024 · 2 comments
Labels
bug For changelog: Minor bug. Will be listed after features

Comments

@m-dinesh-kumar
Copy link

Jenkins and plugins versions report

We have the gitlab hosted under context path

When the Gitlab hook is triggered to Jenkins, the gitlab-plugin returns the response as below. The commit id url is throwing 404 error, when removing /gitlab its working. I believe the project specific url mapping is not using the plugin Gitlab url. It uses

Plugin Version: 1.8.0
Jenkins Version: 2.426

Call GitLab:
HTTP method: GET
URL: https://[DOMAIN_NAME]/gitlab/api/v4/projects/gitlab%2Fproject-name%2Fjenkins%2Ftest-backend/repository/commits/52c5fea3d5fd40a86e476abef9bae80d1863368b
Request headers: [
Accept = [application/json],
PRIVATE-TOKEN = [****FILTERED****]
]
Feb 23, 2024 1:22:35 PM FINEST com.dabsquared.gitlabjenkins.gitlab.api.impl.ResteasyGitLabClientBuilder
Got response from GitLab:
URL: https://[DOMAIN_NAME]/gitlab/api/v4/projects/gitlab%2Fproject-name%2Fjenkins%2Ftest-backend/repository/commits/52c5fea3d5fd40a86e476abef9bae80d1863368b
Status: 404 Not Found
Response headers: [
Access-Control-Allow-Credentials = [true],

Please assist on this

What Operating System are you using (both controller, and any agents involved in the problem)?

Ubuntu OS 20.04 LTS
Plugin Version: 1.8.0
Jenkins Version: 2.426

Reproduction steps

Host the gitlab using context path and set that url in the Gitlab plugin as below

https://[DOMAIN_NAME]/gitlab

Expected Results

https://[DOMAIN_NAME]/gitlab/api/v4/projects/project-name%2Fjenkins%2Ftest-backend/repository/commits/52c5fea3d5fd40a86e476ab

Without /gitlab after /api/v4/projects

Actual Results

https://[DOMAIN_NAME]/gitlab/api/v4/projects/gitlab%2Fproject-name%2Fjenkins%2Ftest-backend/repository/commits/52c5fea3d5fd40a86e476ab

Anything else?

No response

Are you interested in contributing a fix?

No response

@m-dinesh-kumar m-dinesh-kumar added the bug For changelog: Minor bug. Will be listed after features label Feb 23, 2024
@m-dinesh-kumar
Copy link
Author

Hi

Any update on using the context path

@MarkEWaite
Copy link
Contributor

Any update on using the context path

No update. Pull requests are welcomed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features
Projects
None yet
Development

No branches or pull requests

2 participants