Comments (24)
@LaoArchAngel what is the user level of the api key that you used in gitlab?
from gitlab-plugin.
Admin for our GitLab installation. I don't think the user is a member of
some of these projects, but the projects are set to internal, so the user
should be able to discover, clone and fetch. I will try adding the user as
a member of the repositories and report back.
On Thu, Feb 19, 2015 at 11:44 AM, bassrock [email protected] wrote:
@LaoArchAngel https://github.com/LaoArchAngel what is the user level of
the api key that you used in gitlab?—
Reply to this email directly or view it on GitHub
#58 (comment)
.
from gitlab-plugin.
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.
from gitlab-plugin.
@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.
from gitlab-plugin.
@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.
from gitlab-plugin.
Hi, I have same problem
Jenkins ver. 1.606 (Windows 7 host)
gitlab GitLab 7.8.4
jenkins user have right's developer (but I try change to master, owner and nothing)
some next ideas what is bad?
thx
from gitlab-plugin.
@LaoArchAngel or @JaSei can you provide some logs?
from gitlab-plugin.
I may be able to. Can you guide me on where to get the logs you need? Would
I have to change log verbosity somewhere?
On Apr 13, 2015 11:30 AM, "bassrock" [email protected] wrote:
@LaoArchAngel https://github.com/LaoArchAngel or @JaSei
https://github.com/JaSei can you provide some logs?—
Reply to this email directly or view it on GitHub
#58 (comment)
.
from gitlab-plugin.
go to JENKINSHOST/log and create a new logger with a high verbosity level.
from gitlab-plugin.
In log doesn't nothing on this...
If I open configuration of job - nothing new in log...
If I save configuration of job, then:
ScavengerFeeder2-deploy #100 main build action completed: SUCCESS
Dub 16, 2015 9:01:47 DOP. WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
'stapler-class' is deprecated: hudson.tasks.LogRotator
Dub 16, 2015 9:01:47 DOP. WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
'stapler-class' is deprecated: hudson.plugins.git.extensions.impl.PreBuildMerge
Dub 16, 2015 9:01:47 DOP. WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
'stapler-class' is deprecated: hudson.tasks.Shell
Dub 16, 2015 9:01:47 DOP. WARNING org.kohsuke.stapler.RequestImpl$TypePair convertJSON
'stapler-class' is deprecated: hudson.tasks.Mailer
from gitlab-plugin.
I'm having the same issue. Did anyone find a solution? If you still need logs let me know which ones you need. Thanks!
from gitlab-plugin.
Looking for a solution to this as well. This is currently stopping us from specifying a production/deployment build in Jenkins.
from gitlab-plugin.
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.
from gitlab-plugin.
Same here.
- GitLab 6.8.2
- Jenkins ver. 1.609.1 (Ubuntu 14.04)
from gitlab-plugin.
I am also experiencing this.
- GitLab 7.9.2
- Jenkins ver. 1.609
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.)
from gitlab-plugin.
Same problem here
Gitlab-Plugin 1.1.16
Jenkins: 1.596.2
Gitlab: 7.9.1
from gitlab-plugin.
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.
from gitlab-plugin.
Please see if this can be of any help:
http://stackoverflow.com/questions/31339318/jenkins-filter-branches-empty/31341937#31341937
from gitlab-plugin.
I have the same problem:
Single (non-clustered) Jenkins and GitLab servers.
GitLab v. 7.8.4 (on
Jenkins v. 1.622
GIT client plugin 1.18.0
GIT plugin 2.4.0
GitLab Plugin 1.1.25
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 = (none)
Repository browser = gitlab
URL = http://gitlab.our.domain/GroupName/ProjectName
Version = 7.8
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)
from gitlab-plugin.
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 <allowedBranches>
element (example below).
<triggers>
<com.dabsquared.gitlabjenkins.GitLabPushTrigger plugin="[email protected]">
<spec></spec>
<triggerOnPush>true</triggerOnPush>
<triggerOnMergeRequest>false</triggerOnMergeRequest>
<triggerOpenMergeRequestOnPush>true</triggerOpenMergeRequestOnPush>
<ciSkip>true</ciSkip>
<setBuildDescription>true</setBuildDescription>
<addNoteOnMergeRequest>true</addNoteOnMergeRequest>
<addVoteOnMergeRequest>true</addVoteOnMergeRequest>
<allowAllBranches>false</allowAllBranches>
<allowedBranches>
<string>trunk</string>
<string>whatever-branch</string>
</allowedBranches>
</com.dabsquared.gitlabjenkins.GitLabPushTrigger>
</triggers>
from gitlab-plugin.
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).
I added my branch, and it says the branch cannot be found, but works regardless.
So i guess this was fixed by e47e81c ?
from gitlab-plugin.
Hi,
As my contribution to this project I'd like to tell the story of my struggle with this problem. I hope that it will help others to handle it.
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.
You can check that the communication is ok by running i.e.:
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/user"
If succeed, the plugin can freely use GitLab API.
The plugin to fetch the available branches do not use anything like git branch -a
. It uses the API.
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:
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects"`
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 ssh_url_to_repo
and http_url_to_repo
fields from project object with the source repository url. This must be the exact match. And this is probably the place you failed.
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:
- ssh://[email protected]/example/example.git
- ssh://[email protected]:22/example/example.git
- ssh://[email protected]/example/example
- ssh://git:[email protected]/example/example.git
- [email protected]:22/example/example.git
- https://your.example.repo/example/example
- http://your.example.repo/example/example.git
- https://jenkins:[email protected]/example/example.git
- ...and so on
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
from gitlab-plugin.
@omehegan: I was going to write a fix for this issue... ;)
from gitlab-plugin.
@pwl89 oh, I thought it was fixed already. If not, I will reopen.
from gitlab-plugin.
Related Issues (20)
- create MR while running branch pipe creates mixed status with never ending branch status HOT 1
- GitLab Plugin doesn't allow rebuild on comment.
- Disabling the option "Enable authentication for '/project' end-point" in Jenkins
- webhook return 404
- acceptGitlabMR doesn`t throw exception in case of merge failure HOT 1
- Authentication in Jenkins does not work HOT 2
- updateGitlabCommitStatus is not working with Jenkins Merge Request jobs HOT 2
- The test connection button on Jenkins' configure page throws Client error: CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES HOT 6
- HTTP 403 Forbidden not treated as an error for step: updateGitlabCommitStatus
- Add pull_request_template.md for standardized format to submit changes
- with version 1.8.0 gitlab plugin, no build is queued in jenkins after MR is raised in gitlab HOT 1
- Add git merge request variables to parameter of jenkins build (not only to environment)
- Webhook firing although configuration doesn't match
- Gitlab with context path /gitlab - Commit url - 404 HOT 2
- Error 403 anonymous is missing the Tarea/Build permission on multibranch project when executing webhook push
- Webhook trigger handler does not process new commit trigger on open merge requests: GitLab plugin 1.8.0 HOT 1
- CasC issue with gitLabConnectionConfig : empty connection created
- UpdateGitlabCommitStatus in Jenkins not Displaying Stages in GitLab UI after Upgrading HOT 10
- After starting with hpi:run, you can only interact with localhost HOT 5
- 404 on webhook just in Issue events
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitlab-plugin.