Job Exporter Plugin

Plugin Information

Plugin ID job-exporter
Latest Release 0.3.1
Latest Release Date Mar 22, 2011
Sources [External]
Support Eclipse Hudson Forum
Issue Tracking Eclipse Bugzilla

Adds a build step that exports runtime parameters into a properties file (e.g who triggered the build, what is her email address...). This information can be read by other build steps.

 job-exporter plugin

Enabling

To use it, edit the configuration of a particular job, go to "Build" and click "Add build step", in the list select "Export Job runtime parameters", this will create the files at the point in the build where this step is executed.

Details

This plugin exports hudson (runtime) job parameters into a ".properties" file. So other build steps (e.g. ant scripts) can read those parameters and work with them. For example: send some information via email to the user who triggered a job.

The property file is named "hudsonBuild.properties" and will be created in the project workspace. This file contains the following informations:

Property Meaning
build.jobName Name of running job
build.number Number of running job.
build.user.name User that triggered this job. Only filled if the build was trigged by an user.
build.user.fullName Full name of user that triggered this job.
build.user.emailAddress Email address of user that triggered this job. If no user with email address was found, the admin email address stands here.
build.user.name User that triggered this job. Only filled if the build was trigged by a user.
build.upstream.number Number of upstream job that triggered this job. Only filled if the build was trigged by an upstream project.
build.upstream.project Upstream project that triggered this job.
build.remote.host Remote host that triggered this job. Only filled if the build was trigged by a remote host.
build.remote.note Host note for remotely trigged job.
build.admin.emailAddress This is the current administrator email address.
build.id Build id.
build.summary Build summary like "Executor #3 for master : executing MyJob #28"
build.cvsBranch CVS branch, if configured.
build.hudson.version Running hudson version.

 Version History

Version 0.3 (31 Jan 2011)

  • This is just a bugfix release that should work as described before.

Version 0.2 (29 Jan 2011)

  • User triggered build now has correct user email address again
  • Upstream and remote build causes also provide some informations

Version 0.1 (01 Dec 2009)

  • Initial release

Labels:

plugin-builder plugin-builder Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Jan 14, 2011

    Hendryk Bockelmann says:

    For me this is a really useful plugin, thank you ... but could you perhaps set a...

    For me this is a really useful plugin, thank you ... but could you perhaps set an additional property, namely the build cause. With this extra information one could use the output in hudsonBuild.properties to inform the user that triggered the job or determine the upstream job and find the user in that properties file.

    1. Jan 28, 2011

      Michael Meyling says:

      Hello Hendryk, the next release (0.2) should give you that information. Greeti...

      Hello Hendryk,

      the next release (0.2) should give you that information.

      Greetings, Michael

      1. Jan 31, 2011

        Hendryk Bockelmann says:

        Hey Michael, thanks for the new release - I just installed it but now get false...

        Hey Michael,

        thanks for the new release - I just installed it but now get false results: the build.user.name and build.user.emailAddress which were previously correct (login name and mail address from LDAP) are now 'SYSTEM' and 'SYSTEM@domain.de'.

        Furthermore, I think it would be better to leave the field build.user.emailAddress empty if the build was triggered by upstream project. If you set the admin mail address here a script might send results to the wrong recipient.

        1. Jan 31, 2011

          Michael Meyling says:

          Hello Hendryk, thanks for the reply. I tested the plugin with another Hudson in...

          Hello Hendryk,

          thanks for the reply. I tested the plugin with another Hudson instance and can confirm your bug. I am working on it. There will be a new release within the next few hours.

          Greetings, Michael

        2. Jan 31, 2011

          Michael Meyling says:

          Hello Hendryk, the next release (0.3) was just created and should appear in the...

          Hello Hendryk,

          the next release (0.3) was just created and should appear in the update center soon.

          Please inform me if the new version is working correctly.

          Thanks, Michael