Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "Started by an SCM change" in Hudson?

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?

like image 668
Rakesh Juyal Avatar asked Nov 12 '10 10:11

Rakesh Juyal


People also ask

What is an SCM change?

Source code management (SCM) is used to track modifications to a source code repository. SCM tracks a running history of changes to a code base and helps resolve conflicts when merging updates from multiple contributors. SCM is also synonymous with Version control.

What is SCM trigger?

The trigger system in Plastic SCM allows the execution of user commands at specific points in the client or server execution workflow, using shell scripts, or any other operating system executable.


3 Answers

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.

like image 56
Sagar Avatar answered Jan 01 '23 21:01

Sagar


"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.

like image 36
skaffman Avatar answered Jan 01 '23 20:01

skaffman


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

like image 27
KD. Avatar answered Jan 01 '23 21:01

KD.