سؤال

I was trying to find out who triggered the failing Hudson build. But i found Started by an SCM change instead of Started by 'UserId'. Now, what does that mean?

هل كانت مفيدة؟

المحلول

It means that someone checked in code changes to your version control system / software configuration management (CVS, SVN, Git, etc), and Hudson started a built based on that change.

You should be able to see who it was by clicking the "Changes" link on the left menu.

نصائح أخرى

"SCM" is "software configuration management", i.e. your version control system. Hudson can be configured to poll CVS, SVN etc for changes to your source code, and trigger a build based on that change.

I was working on a script to fire off an email with a list of changeset to a developer who started the build. After spending a couple hours on the web trying to search for a solution, I found a workaround digging through hudson log files. Probably not the cleanest way of doing it, but it works. Every time when hudson fire off a build, it records the build status to a log file. The log looks something like this..

Started by user <****>
Building remotely on Slave1
$ hg clone -r test_clone https://mercuial.com/build /some/workspace/test_clone
adding changesets
adding manifests
adding file changes
added 355 changesets with 298 changes to 43 files
updating to branch default
41 files updated, 0 files merged, 0 files removed, 0 files unresolved
...
...

The log file is in ~workspace/jobs/${RELEASE}/builds/${BUILD_NUMBER}/log. You can then parse the log file for the UserId. Something like this should work.

UserID=head -1 ~workspace/jobs/${RELEASE}/builds/${BUILD_NUMBER}/log|cut -d" " -f4

Had the same problem in jenkins when checkout branch name and specified branch name where same. Any change triggered hudson to automatically create a build to catch-up.

solved by: change local branch name to something else (or don't use it, maybe)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top