美文网首页iOS自动化
jenkins2.7-gitlab-merge-request-

jenkins2.7-gitlab-merge-request-

作者: 知傲 | 来源:发表于2016-08-13 22:04 被阅读604次

    照着jenkins-gitlab-merge-request-builder-plugin/一步步配置,构建触发后开始拉代码,然后就error了

    > git -c core.askpass=true fetch --tags --progress ssh://git@*** HIDDEN **.git +refs/heads/:refs/remotes/origin/*
    > git rev-parse refs/remotes/origin/${gitlabSourceBranch}^{commit} # timeout=10
    > git rev-parse refs/remotes/origin/refs/remotes/origin/${gitlabSourceBranch}^{commit} # timeout=10
    > git rev-parse refs/remotes/origin/${gitlabSourceBranch}^{commit}
    # timeout=10
    ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
    Finished: FAILURE
    

    从log来看是插件的参数${gitlabSourceBranch}没有生效,一直怀疑是不是哪一步弄错了,一时没解决就放着,今天去看了看另一个插件Gitlab PluginReadme里面提到一个Jenkins的Security updates,Jenkins修改了参数的传递方式,部分插件开发者可能没来得及更新,文末放出了work around

    Set hudson.model.ParametersAction.keepUndefinedParameters to true, e.g.java -Dhudson.model.ParametersAction.keepUndefinedParameters=true -jar jenkins.war to revert to the old behavior of allowing any build parameters. Depending on your environment, this may be unsafe, as it opens you up to attacks as described above.
    Set hudson.model.ParametersAction.safeParameters to a comma-separated list of safe parameter names, e.g. java -Dhudson.model.ParametersAction.safeParameters=FOO,BAR_baz,quX -jar jenkins.war.
    搞定后顺便给插件提了Issue

    相关文章

      网友评论

      • panpanliuBJ:gitlabSourceBranch 需要手动配置吗?不是gitlab-merge-request-builder-plugin 插件默认给他赋值吗?
        知傲:@f56c875387c3 不需要

      本文标题:jenkins2.7-gitlab-merge-request-

      本文链接:https://www.haomeiwen.com/subject/nzhysttx.html