Zen Timestamp Plugin does not work for me with Matrix builds on Windows when the overriding format is specified at the job level – the default format is retained both in build steps and post build actions. It works fine with regular builds and with matrix builds when the format is overridden at the system level.
Anybody can suggest a good workaround?
Just in case: Jenkins v1.442, Zen Plugin v3.0; here is config.xml for a test build:
<matrix-project>
<actions/>
<description/>
<logRotator>
<daysToKeep>-1</daysToKeep>
<numToKeep>2</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
</logRotator>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.plugins.zentimestamp.ZenTimestampJobProperty>
<changeBUILDID>true</changeBUILDID>
<pattern>yyyyMMddHHmmss</pattern>
</hudson.plugins.zentimestamp.ZenTimestampJobProperty>
</properties>
<scm class="hudson.scm.NullSCM"/>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers class="vector"/>
<concurrentBuild>false</concurrentBuild>
<axes>
<hudson.matrix.LabelAxis>
<name>label</name>
<values>
<string>Master</string>
</values>
</hudson.matrix.LabelAxis>
</axes>
<builders>
<hudson.tasks.BatchFile>
<command>echo %BUILD_ID%</command>
</hudson.tasks.BatchFile>
</builders>
<publishers>
<hudson.plugins.emailext.ExtendedEmailPublisher>
<recipientList>myname@mycompany.com</recipientList>
<configuredTriggers>
<hudson.plugins.emailext.plugins.trigger.SuccessTrigger>
<email>
<recipientList/>
<subject>$PROJECT_DEFAULT_SUBJECT</subject>
<body>$PROJECT_DEFAULT_CONTENT</body>
<sendToDevelopers>false</sendToDevelopers>
<includeCulprits>false</includeCulprits>
<sendToRecipientList>true</sendToRecipientList>
</email>
</hudson.plugins.emailext.plugins.trigger.SuccessTrigger>
</configuredTriggers>
<contentType>default</contentType>
<defaultSubject>$DEFAULT_SUBJECT</defaultSubject>
<defaultContent>BUILD_ID is ${ENV, var="BUILD_ID"}</defaultContent>
</hudson.plugins.emailext.ExtendedEmailPublisher>
</publishers>
<buildWrappers/>
<runSequentially>false</runSequentially>
</matrix-project>
And here’s the console output:
Started by upstream project "test Zen plugin matrix" build number 5
Building on master
No emails were triggered.
[Master] $ cmd /c call C:\DOCUME~1\hotbuild\LOCALS~1\Temp\hudson1252624466863059206.bat
C:\Documents and Settings\hotbuild\.jenkins\jobs\test Zen plugin matrix\workspace\label\Master>echo 2012-02-01_12-26-12
2012-02-01_12-26-12
C:\Documents and Settings\hotbuild\.jenkins\jobs\test Zen plugin matrix\workspace\label\Master>exit 0
Email was triggered for: Success
Sending email for trigger: Success
Sending email to: myname@mycompany.com
Finished: SUCCESS
The output should be 20120201122612 – which it is for the similar non-matrix build.
Was a bug in the plugin. Fixed in Release 3.2 (March 10, 2012). I’ve tested it and it works fine.