Community
Participate
Working Groups
During milestone week, with 3 builds scheduled, per day, there are occasionally times when in fact no changes have been made, so the build should not run. That part of our automated script likely needs work. The mail message part is, I think, in place, but untested. The part that needs work is the "reference" tag we use during auto-tagging step. As it is now, we set the old (previous) ID, compute what the new one should be (if changes are found) and then put that into the property file to use for the next run as the old (previous) ID -- and then we run the auto-tagging script and that's when we'd discover no changes were detected, and send out the mail, and not do a build with no changes. The questionable point in those steps is that the property file with old/previous build ID will be inaccurate. I'm not exactly sure what the effects will be on the next round of auto-tagging, but ... doesn't seem like it would know that to accurately compare to. So ... should at least test and/or add script to "roll back" the "old build tag" if no changes were found.
I've moved the code to update the Ibuild.properties file (which essentially holds the current build number, so for the next build, it will be the previous build number) to the end of the masterBuilder script. That will prevent update if there is no build, and, will also prevent update if the build fails for unexpected reasons. (as it did for the git check out failure today). I think more is needed here, but that's move if one step.
I've enabled the "real" email and logic now. And, in the course of this, and trying to get test automation running, I have realized sometimes we will want a "real build", even though no changes detected, since there could be changes in infrastructure or the builder itself that would require it, so the variable continueBuildOnNoChange will be mentioned in some messages (when it is set to true). FYI, the code "around" all this logic is fairly spaghetti-ish but, will leave that clean/up refactoring to another day/bug.
*** Bug 376229 has been marked as a duplicate of this bug. ***
*** Bug 376460 has been marked as a duplicate of this bug. ***
Well, sort of worked. But, message "subject" was wrong. This part: No changes from previous build were detected, but continueBuildOnNoChange was set to true. Was supposed to be in the body of message ... not the subject line. I'll need to see what's different form other examples? Maybe need an empty line to terminate subject?
In the one "sendmail" that has been working, the "Subject: " is followed by a variable, then a blank line. That's only difference I see between it, and the new messages, so will just try using a variable ... instead of understanding it :/ ( echo "From: e4Builder@eclipse.org" echo "To: ${toAddress}" echo "MIME-Version: 1.0" echo "Content-Type: text/plain; charset=utf-8" echo "Subject: $buildsubject" echo " " echo "$eclipseStream Build: $buildId started" echo " " echo " Report of changes based on comparaison to" echo " previous build or tag of $oldBuildTag" echo " " echo "$reporttext" echo " " ) | /usr/lib/sendmail -t ( echo "From: e4Builder@eclipse.org" echo "To: ${toAddress}" echo "MIME-Version: 1.0" echo "Content-Type: text/plain; charset=utf-8" echo "Subject: $eclipseStream Build: $buildId started." echo " " echo " No changes from previous build were detected, but " echo " continueBuildOnNoChange was set to true." echo " " ) | /usr/lib/sendmail -t
Maybe needed escaped quotes for something in second case, but ... if the variable works, I'm happy. I've made that change (to use variable) and will closed as "fixed" ... the opportunity to see this "no changes but continuing anyway" will be rare.