Question

I have just started getting Jenkins setup with Phing as the build tool. Although I have used Jenkins before, I'm new to Phing.

I have a project setup in Jenkins that has a Mercurial Repository setup and a Phing Build step. The build.xml file simply archives the existing file, deletes them and copies the new files from the repository.

I have run phing from the terminal and everything works as planned. However, when running from within Jenkins, I'm getting the following in the Console Output:

[workspace] $ /usr/local/pear/bin/phing -buildfile /Users/Shared/Jenkins/Home/jobs/Project/workspace/build.xml "-Dwebroot=/Volumes/Websites/Project/ -Dcheckoutroot=/Users/Shared/Jenkins/Home/jobs/Project/workspace -Drevision=5" -logger phing.listener.DefaultLogger

/usr/local/pear/bin/phing: fork: Resource temporarily unavailable
Build step 'Invoke Phing targets' marked build as failure

My first thought was that it was permission related, but I've changed Jenkins to run as the same user that I ran Phing manually as and it still got the same issue.

Does anybody have any thoughts as to what might be causing the problem? I can't find anything related to this error anywhere that isn't related to Cygwin...

The system is running on OS X 10.7.5 with Jenkins 1.518 and Phing 2.5.1

The build.xml file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<project name="Project" default="dist">
    <property name="revision" value="old" />
    <property name="webroot" value="/Volumes/Websites/${phing.project.name}" />
    <property name="checkoutroot" value="./" />

    <target name="clean">
        <echo msg="Backing up old site to ${phing.project.name}-${revision}..." />
        <tar destfile="${webroot}/../${phing.project.name}-${revision}.tar.gz" basedir="${webroot}" compression="gzip" />

        <echo msg="Deleting site from ${webroot}..." />
        <delete>
            <fileset dir="${webroot}" />
        </delete>
    </target>

    <target name="dist" depends="clean">
        <echo msg="Copying files to website at ${webroot}..." />

        <copy todir="${webroot}">
            <fileset dir="${checkoutroot}/Website">
                <exclude name="**/.hg/**" />
            </fileset>
        </copy>
    </target>
</project>
Was it helpful?

Solution

I've managed to resolve this issue by removing all of the path details in the Phing configuration section within Jenkins.

This makes absolutely no sense to me as to why it's working without these details as I definitely only have one Phing install, so it's not as if it was picking up the wrong one or something.

However, by not specifying anything in the Phing section of the Jenkins project config so it picks up the default path, default build target etc. and this is working flawlessly now!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top