Use Hudson to build a specific git commit

前端 未结 7 850
南笙
南笙 2020-12-13 13:11

I have a hudson build server. The source code is managed by a git repository. For each build the latest version is checked out and compiled. Now i\'d like to tell hudson to

7条回答
  •  失恋的感觉
    2020-12-13 13:35

    One workaround would be to:

    • set the Git plugin to build a special "build_br" branch.
    • reset the branch build_br to the expected commit
    • push that branch build_br to remote repo monitor by Jenkins or Hudson (that would be a push --force, as illustrated in "git reset --hard and a remote repository")

    That way, building that branch build_br would mean building a specific commit, and the GIT_COMMIT will be correctly set.
    No development should take place on that special branch, since it is reset regularly to any commit you need to be build.

提交回复
热议问题