jenkinsci / jenkinsci/gitlab-plugin
Jenkins will not match repository if pulling from HTTP
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 615
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 10
Description
## Issue
### Context
- **Gitlab plugin version**: 1.4.5
- **Gitlab version**: 8.14.0
- **Jenkins version**: 2.32.1
- **Job type**: Freestyle
### Logs & Traces
> skipping resolution of commit remotes/origin/release, since it originates from another repository
### Problem description
The GitLab plugin will use the `repository.url` field to identify the repository a (commit/merge request/etc) push comes from. This however is the SSH url. When the Jenkins clone is pulled from HTTPS, it will not correctly match the push against the clone.
A work around is to change the field to `repository.git_http_url`, but this would break existing installations. See https://github.com/pvginkel/gitlab-plugin/commit/f1bd7748d158de7210f76f767e0a7ce7b639cb4d for these changes. Probably this should become a setting since it seems that `RevisionParameterAction` can only accept a single URL, so the decision of what URL to pass needs to be made in the GitLab plugin. Another option would be do something in GitLab but, alas, https://github.com/gitlabhq/gitlabhq/blob/9ad0d879fb99685f5b41994911983ab7d05ace31/app/models/project_wiki.rb#L35 implies that this is not configurable.
Contributor guide
Assessment
This issue has not been assessed yet.