Post-Commit Hook to trigger automatic Jenkins Build

后端 未结 2 2184
盖世英雄少女心
盖世英雄少女心 2020-12-28 21:01

I know that there are many similar postings, but I have not found a solution, and the advice and solutions presented in the other posts don\'t quite jive with what I\'m seei

2条回答
  •  猫巷女王i
    2020-12-28 21:13

    The article you linked says

    Jobs on Jenkins need to be configured with the SCM polling option to benefit from this behavior. This is so that you can have some jobs that are never triggered by the post-commit hook (in the $REPOSITORY/hooks directory), such as release related tasks, by omitting the SCM polling option. The configured polling can have any schedule (probably infrequent like monthly or yearly). The net effect is as if polling happens out of their usual cycles.

    and

    For this to work, your Jenkins has to allow anonymous read access (specifically, "Job > Read" access) to the system. If access control to your Jenkins is more restrictive, you may need to specify the username and password, depending on how your authentication is configured.

    Does you server meets this restrictions?

提交回复
热议问题