Jenkins Error: Process Leaked Filed Description when running an ANT call - perl

I'm currently receiving a "Process Leaked File Description" error whenevery I'm trying to call my ANT script from a Perl script in Jenkins. The job actually finishes currectly, but it's erroring in Jenkins. The Perl script calls something similar to
exe("CALL ant -buildfile C:\\build.xml");
I have tried googling this Jenkins issue elsewhere and none of the things I have tried appear to work. Anyone have anything else I can try?

You should not call ant from a perl script.
Jenkins has a plugin for ant builds.
If your script generates the build.xml you can set up two actions in your project config. The first with the script to generate the buildfile and the second to execute ant on it.

Related

Getting java.awt.HeadlessException after run gui tests on Jenkins

After running gui tests on Jenkins I am getting java.awt.HeadlessException on build Jenkins:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
I am using xvfb in pipeline Jenkins (script), eclipse & maven.
How coud I solve this issue via Jenkins file (script) or maven pom or in another way?
Why am I getting this exception?
Somewhere in your pipeline you probably need to have export DISPLAY=:0.0 or something similar.

Why does TFS build "partially succeed" on this line?

The Problem
I'm adding a pre-build script to our TFS build that calls npm install among other things. One package, gulp-imagemin, installs a few dependencies that each run a test when they install that says they've installed successfully. TFS is interpreting this output as an error even though it's actually a success message. It causes my build to "partially succeed".
The unrecognizable characters above are supposed to be a checkmark (I can see it when running locally)...apparently TFS is not a fan, but there are other lines in the output where this happens and it doesn't show an error next to it, so I don't think that's the cause.
Here's where that message comes from:
https://github.com/imagemin/gifsicle-bin/blob/master/lib/install.js#L34
Does anyone know why TFS is interpreting this as an error, or how I can fix this? Thanks much!
What I've Tried
I've tried to silence its output (by redirecting stdout and stderr to $null) to no avail. When running my .ps1 script locally, I can successfully silence that message, but when the script runs in TFS it still gets printed out. I'm not sure what the difference is.
I also tried making my script a .cmd script instead of .ps1 and that had an interesting effect. The silencing I originally intended worked, but then it would effectively skip the step and the remaining pre-build steps. When I removed the output redirect to nul so I could debug, it brought me back to the same error above with no new info.

How do I run build Release from the command line in Eclipse / Flash Builder

Is there a way to run a Export Release build from the command line in Flash Builder (Eclipse)?
More Context
Flash Builder has debug, run and build release commands or configurations (not sure what they're called). I want to put Flash Builder on the server and invoke the build release configuration from the command line.
You don't need Flash Builder on the server. You can do it with the Flex SDK, Java and Apache ANT installed on the server. If it is a Windows server you can set it up to run like this:
Create an ANT script to update from the repository, then build the Flash app.
Create a .bat file to run the ANT build (literally just a text file 'build.bat' in the folder with the build.xml that just says 'ant' in it).
Set up a scheduled task to run the build.bat at whatever interval you desire, or, if you have SVN on the same server you can set up a post commit hook to run that scheduled task so when a person commits to the repo, the build script will run and the new version can be viewed on the dev server.
I have an ANT script that also will email all devs if the build fails to let everyone know who broke the build, so they can take care of it. If you message me back I would be happy to post a zip for you with my ANT script files you can use an example.
EDIT: I've posted the files to GitHub in case anyone else needs them. https://github.com/royaldigit/ant-flash-build

TeamCity can't find NAnt

I am trying to call a NAnt script from TeamCity, but I'm encountering something that makes no sense to me.
I've tested the NAnt script from the command line and it works perfectly.
I've configured the NAnt build runner in TeamCity, and when I run it, I get the following error:
Step 3/3
The following paths do not contain NAnt:
C:\nant\bin
C:\TeamCity6\buildAgent\work\59c8c293c5dec971\C:\nant\bin
Please check "NAnt home" parameter at the build runner settings page
I've checked many times that the NAnt executable resides in C:\nant\bin
Am I missing something?
Check to make sure the user that team city is running as has permission to that file...
You should have everything you need to build your project (NAnt included) in your repository (Eg. in build\tools folder). Everyone should be able to build after check-out without installing tools.

Is it possible to suppress NAnt's exec task's "[exec]" console output prefix

I'm trying to integrate Robot Framework (an acceptance testing framework) with TeamCity. In order to do this it needs to send messages to the console output which TeamCity will then read and return realtime test progress/results. I'm doing this by calling the command line to run the tests with a simple exec task. Everything seemed to be working other than I was only getting the results at the end of the run and not on the fly.
After a bit of struggling with NAnt I swapped to using MSBuild and everything worked first time.
I have what I need now, but for completeness I'd like to find out why I couldn't get it working with NAnt. As far as I can tell the issue is that NAnt is prefixing all console output with [exec]. Is it possible to suppress this?
I don't think the console output is configurable.
NAnt is open source: you could fork your own copy and/or submit a feature patch.