We have a stash repo "myrepo" and a fork "myrepofork" with a pull request of changes to be brought back to "myrepo". The change in "myrepofork" has changeset 328a334d194 and as far as I can tell Jenkins is told to build that changeset, but not that the changeset is to be found in "myrepofork".
Is this supposed to work? Do I need to configure things differently? Or do I need to give my teams access to write branches into the official repository and create pull requests from there?
Jenkins job console snippet:
00:00:01.089 > git rev-parse 328a334d19468ee9bf569de72fdf8a14abc5dcd4^{commit} # timeout=10 00:00:01.099 FATAL: Command "git rev-parse 328a334d19468ee9bf569de72fdf8a14abc5dcd4^{commit}" returned status code 128: 00:00:01.099 stdout: 328a334d19468ee9bf569de72fdf8a14abc5dcd4^{commit} 00:00:01.099 00:00:01.099 stderr: fatal: ambiguous argument '328a334d19468ee9bf569de72fdf8a14abc5dcd4^{commit}': unknown revision or path not in the working tree. 00:00:01.099 Use '--' to separate paths from revisions 00:00:01.099 00:00:01.099 hudson.plugins.git.GitException: Command "git rev-parse 328a334d19468ee9bf569de72fdf8a14abc5dcd4^{commit}" returned status code 128: 00:00:01.099 stdout: 328a334d19468ee9bf569de72fdf8a14abc5dcd4^{commit} 00:00:01.099 00:00:01.099 stderr: fatal: ambiguous argument '328a334d19468ee9bf569de72fdf8a14abc5dcd4^{commit}': unknown revision or path not in the working tree. 00:00:01.099 Use '--' to separate paths from revisions
No it is not suppose to work. You will need a Jenkins job for repo "myrepofork".
You could poll the REST API:s of Stash to find new pull requests. Then you can have a parameterized build job in Jenkins that builds pull requests. So that you dont need to create new build jobs for every new fork, just one job that builds pull requests from any repo.
Find all repos: http://stash/rest/api/1.0/projects/EXP/repos/
Find all pull requests: http://stash/rest/api/1.0/projects/EXP/repos/REPOSLUG/pull-requests?base&details&filterText&orderBy
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.