jenkins-gitlab-merge-request-builder-plugin icon indicating copy to clipboard operation
jenkins-gitlab-merge-request-builder-plugin copied to clipboard

Build won't use parameters if not manually set

Open arruda opened this issue 10 years ago • 4 comments

I've done just like the Readme.md says, but when I ask it to build something (clicking on [Build Now]) or if I wait for it the SCM Polling it aways give me this error in the console log:


 > git rev-parse --is-inside-work-tree
Fetching changes from 2 remote Git repositories
 > git config remote.${gitlabSourceName}.url ${gitlabSourceRepository}
Fetching upstream changes from ${gitlabSourceRepository}
 > git --version
using GIT_SSH to set credentials my_credentials
 > git fetch --tags --progress ${gitlabSourceRepository} +refs/heads/*:refs/remotes/${gitlabSourceName}/*
FATAL: Failed to fetch from ${gitlabSourceRepository}
hudson.plugins.git.GitException: Failed to fetch from ${gitlabSourceRepository}

Just to be sure: I've set 2 git repositories:

  • [email protected]:user.name/testing.git (named origin)
  • ${gitlabSourceRepository} (named ${gitlabSourceName})

Also told jenkins to build 2 branches:

  • origin/${gitlabSourceBranch}
  • ${gitlabSourceName}/${gitlabSourceBranch}

And added the Merge Before Build thing, with name as origin, branch as ${gitlabTargetBranch} and Merge strategy set to default.

I'm using;

  • Jenkins ver 1.565
  • Git plugin ver 2.2.1
  • Git Client Plugin ver 1.9.1
  • Gitlab Merge Request Builder ver 1.2.2
  • GitLab 7.5.1

OBS: if I manually add the parameters (using the This build is parameterized) then the build works with no problems.

arruda avatar Feb 03 '15 14:02 arruda

Reading https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build I found this:

Limitations Currently the following are the known problems: When build triggers are used to start a build, there's no way to pass parameters. This includes SCM polling, downstream builds, and periodic builds. Instead, the specified default values will be used for string, boolean and choice parameters.

Is the gitlab-merge-request-builder included in this? if so, then how the hell should it work?

arruda avatar Feb 03 '15 15:02 arruda

I'm using Parameterized Trigger plugin 2.24

arruda avatar Feb 03 '15 15:02 arruda

Did you check the build trigger "Gitlab Merge Requests Builder" or "Poll SCM"? You need the first trigger "Gitlab Merge Requests Builder" and set the Gitlab Project Path to "user.name/testing" and a Crontab line for the polling interval like "H/5 * * * *".

Check you Jenkins System Log for any error messages containing "gitlab". I first entered the Gitlab Project Path with the trailing ".git" which caused an error only visible in the system log.

EmteZogaf avatar Feb 19 '15 11:02 EmteZogaf

I matter the same matter, it does not work in two methods: origin/${gitlabSourceBranch} ${gitlabSourceName}/${gitlabSourceBranch}

some one can help me ?

panpanliuBJ avatar Nov 06 '17 12:11 panpanliuBJ