-
Notifications
You must be signed in to change notification settings - Fork 619
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
Empty Filter Branches Select Box #58
Comments
@LaoArchAngel what is the user level of the api key that you used in gitlab? |
Admin for our GitLab installation. I don't think the user is a member of On Thu, Feb 19, 2015 at 11:44 AM, bassrock [email protected] wrote:
|
I have now tried setting the user as a master of a repository with a jenkins job, changed the API key in global jenkins config to the owner of the gitlab repository (my API key), saved, triggered the build, still empty. |
@LaoArchAngel if you look at the gitter chat, it looks like some have reported this an issue with the permissions required by gitlab and it being set to internal. |
@bassrock Sorry for the late response. I tried changing the project to Public visibility. The branch list is still empty. Read / searched gitter chat, but none of the suggestions there helped. |
Hi, I have same problem jenkins user have right's developer (but I try change to master, owner and nothing) thx |
@LaoArchAngel or @JaSei can you provide some logs? |
I may be able to. Can you guide me on where to get the logs you need? Would
|
go to JENKINSHOST/log and create a new logger with a high verbosity level. |
In log doesn't nothing on this...
|
I'm having the same issue. Did anyone find a solution? If you still need logs let me know which ones you need. Thanks! |
Looking for a solution to this as well. This is currently stopping us from specifying a production/deployment build in Jenkins. |
We are suffering from the same problem. Funny thing though, with one Jenkins (host on Windows) it works, and with one (Linux) it doesnt. UPDATE: We actually found the problem, which was pretty trivial. We added Jenkins as a reporter, but not with the actual repository but rather with the Project (which contains different repositories). After ading Jenkins as a reporter on the repository it started to work. |
Same here.
|
I am also experiencing this.
Edit: I just realized, this feature is not what i am looking for. I want to add a list of disallowed branches. This list supposed to contain the allowed branches. Is there any way to achieve what i want? (Real case: i want to build all branches except master.) |
Same problem here Gitlab-Plugin 1.1.16 |
Is it possible, that the filtered-branches box only works when using key-based auth? I switched the checkout form username/password to ssh-keys and now it works. |
Please see if this can be of any help: |
I have the same problem: Single (non-clustered) Jenkins and GitLab servers. In my global Jenkins configuration, I have set the GitLab section as follows: In my project configuration, I have as follows: Build when a change is pushed to Gitlab. = (Checked) |
I had this problem as well and here is how I solved it - though it appears that this may be caused by many different things. I followed the instructions as specified here, but still did not work: http://stackoverflow.com/questions/31339318/jenkins-filter-branches-empty/31341937#31341937 My build's repository URL was using SSH with 'None' selected for Credentials. I changed this to our HTTPS URL with a GitLab user's credentials with a 'Developer' role (though 'Reporter' may also work), and saved the job. I then had to leave the job configuration page and come back and the list was populated. This may be all most of you need to do, but our preferred method of authentication is SSH, so I next updated the job setting it back to SSH without credentials and saved it. Leaving the job and coming back in shows the box is now empty again, however, looking at the job's config.xml, the branch setting is still selected and is being used. Or, for that matter, you could probably just modify the config.xml directly by updating the
|
After updating to the latest version, there is no selector box, but a textfield. This field accepts a comma-separated list of branches to be built. (Also there is a similar exclude field). So i guess this was fixed by e47e81c ? |
Hi, At the beginning you have to be shure that you properly set your Jenkins user's account token in global settings. This is because plugin uses GitLab REST API to communicate with GitLab.
If succeed, the plugin can freely use GitLab API. The plugin to fetch the available branches do not use anything like While the documentation does not tell explicitly that you can use the project name as an Id, plugin does not yet use /repository/branches. Plugin needs to find out the project Id. To achieve that plugin fetches list of all projects and tries to find out with is the one. To do this plugin does not use /projects/all. There is called the /projects At this stage this is very important to properly configure the Jenkins user. It doesn't matter that user has the admin privileges. The project must be accessible by the Jenkins user. User have to be a member of a group or member of the project or project must be public. And this is probably the place you failed. To see the list of projects accessible by the user try:
The next step is to find the project. It seems that the only information available to distinguish the projects is the source repository url. So pugin compares the For example if you uses only VPN for SSH connections, and you have to place the IP address as source repository url it will fail. Few examples that works with git but not with a plugin:
And finally after then plugin uses the project id to call /repository/branches I hope that this was helpful. CC: @LaoArchAngel @JaSei @stevemyers @valloq @mirupal @WonderCsabo @klausbayrhammer @amorenopl @joshtkehoe |
@omehegan: I was going to write a fix for this issue... ;) |
@pwl89 oh, I thought it was fixed already. If not, I will reopen. |
Fixes Jenkins-24954
Filter branches select box never gets populated with the branches from a project.
Here’s my setup:
Single (non-clustered) Jenkins and GitLab servers.
GitLab v. 7.7.8 (on
Jenkins v. 1.588 (on Windows Server 2014)
GIT client plugin 1.16.1
GIT plugin 2.3.5
GitHub Plugin 1.10
GitLab Plugin 1.1.14
In my global Jenkins configuration, I have set the GitLab section as follows:
Gitlab host URL = http://gitlab.our.domain (I have also tried the IP address for all gitlab.our.domain)
API Token = (Set)
Ignose SSL Certificate Errors = (Checked)
Test Connection = Success when clicked
In my project configuration, I have as follows:
GitHub project = http://gitlab.our.domain/GroupName/ProjectName/
Git Repository URL = [email protected]:GroupName/ProjectName.git
Credentials = (ssh key set)
Name = origin
Repository browser = gitlab
URL = http://gitlab.our.domain/GroupName/ProjectName
Version = 7.7
Build when a change is pushed to Gitlab. = (Checked)
Build on Push Events = (Checked)
Set build description to build cause = (Checked)
Add note with build status on merge requests = (Checked)
Filter branches = (Blank)
I have saved and reloaded the configuration.
I have set up the GitLab CI settings on GitLab. Clicking the Test settings button triggers a build successfully.
The build can reach gitlab, pull, clone, and build.
The only thing that does not appear to be working is the Filter branches box.
I don't know if I should be looking for logs somewhere. I would love to debug this myself, but this would be my first jenkins plugin debugging venture and I don't think I have the bandwidth for the learning curve.
The text was updated successfully, but these errors were encountered: