0

We have jenkins setup with our internal GIT repos and backing up our production org and a few sandboxes. I'm trying to add a few more builds in Jenkins for a few other sandboxes, but when I run the build I'm getting this error. Anyone ever ran across this or know what it could mean? I've even created another build to a sandbox that another one is working on and this new one is giving the error.

Started by user admin
Building in workspace /path/home/jenkins/.jenkins/jobs/environment/workspace
[workspace] $ /bin/sh -xe /path/home/jenkins/services/apache-tomcat-7.0.54/temp/hudson5883450197498769442.sh
+ '[' '!' -f sync.sh ']'
+ bash sync.sh
Initialized empty Git repository in /path/home/jenkins/.jenkins/jobs/environment/workspace/code/.git/
warning: You appear to have cloned an empty repository.
find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find.  Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons)
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
Trying the default build file: build.xml
Buildfile: /path/home/jenkins/.jenkins/jobs/environment/workspace/build.xml
Detected Java version: 1.7 in: /path/home/jenkins/jusr/java/jdk1.7.0_60/jre
Detected OS: Linux
parsing buildfile /path/home/jenkins/.jenkins/jobs/environment/workspace/build.xml with URI = file:/path/home/jenkins/.jenkins/jobs/environment/workspace/build.xml
Project base dir set to: /path/home/jenkins/.jenkins/jobs/environment/workspace
parsing buildfile jar:file:/path/home/jenkins/jusr/Ant/apache-ant-1.9.4/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/path/home/jenkins/jusr/Ant/apache-ant-1.9.4/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
 [property] Loading Environment env.
Property "HOSTNAME%%.*" has not been set
Property "PWD/#/path/home/jenkins/~" has not been set
 [property] Loading /path/home/jenkins/.jenkins/jobs/environment/workspace/build.properties
Importing file /path/home/jenkins/.jenkins/tools/deployScripts/build.xml from /path/home/jenkins/.jenkins/jobs/environment/workspace/build.xml
Overriding previous definition of reference to ant.projectHelper
parsing buildfile /path/home/jenkins/.jenkins/tools/deployScripts/build.xml with URI = file:/path/home/jenkins/.jenkins/tools/deployScripts/build.xml
dropping /path/home/jenkins/.jenkins/jobs/environment/workspace/lib/ant-salesforce.jar from path as it doesn't exist
parsing buildfile jar:file:/path/home/jenkins/jusr/Ant/apache-ant-1.9.4/lib/ant-salesforce.jar!/com/salesforce/antlib.xml with URI = jar:file:/path/home/jenkins/jusr/Ant/apache-ant-1.9.4/lib/ant-salesforce.jar!/com/salesforce/antlib.xml from a zip file
 [property] Loading /path/home/jenkins/.jenkins/jobs/environment/workspace/build.properties
Override ignored for property "sf.username"
Override ignored for property "sf.server"
Override ignored for property "sf.password"
 [property] Loading Environment env.
Override ignored for property "env.TOMCAT_STRING"
Override ignored for property "env.CVS_RSH"
Override ignored for property "env.PASSWORD"
Override ignored for property "env.HOME"
Override ignored for property "env.LESSOPEN"
Override ignored for property "env.TOMCAT_PS_COUNT"
Override ignored for property "env.XFILESEARCHPATH"
Override ignored for property "env.BUILD_TAG"
Override ignored for property "env.JAVA_OPTS"
Override ignored for property "env.PWD"
Override ignored for property "env.HUDSON_URL"
Override ignored for property "env.NLSPATH"
Override ignored for property "env.SHLVL"
Override ignored for property "env.MODULEPATH"
Override ignored for property "env.NODE_NAME"
Override ignored for property "env.SHELL"
Override ignored for property "env.JENKINS_HOME"
Override ignored for property "env.MODULESHOME"
Override ignored for property "env.JAVA_HOME"
Override ignored for property "env.MAIL"
Override ignored for property "env.JOB_NAME"
Override ignored for property "env.A__z"
Override ignored for property "env.JENKINS_URL"
Override ignored for property "env.SSH_CONNECTION"
Override ignored for property "env.EXECUTOR_NUMBER"
Override ignored for property "env.LANG"
Override ignored for property "env.NODE_LABELS"
Override ignored for property "env.JOB_URL"
Override ignored for property "env.HOSTNAME"
Override ignored for property "env.HISTSIZE"
Override ignored for property "env.LOGNAME"
Override ignored for property "env.LS_COLORS"
Override ignored for property "env.WORKSPACE"
Override ignored for property "env.PATH"
Override ignored for property "env.SSH_TTY"
Override ignored for property "env.MAVEN_HOME"
Override ignored for property "env.SSH_CLIENT"
Override ignored for property "env.TOMCAT_HOME"
Override ignored for property "env.module"
Override ignored for property "env.USER"
Override ignored for property "env.HUDSON_HOME"
Override ignored for property "env.BUILD_NUMBER"
Override ignored for property "env.SFSERVER"
Override ignored for property "env.JENKINS_SERVER_COOKIE"
Override ignored for property "env.BUILD_URL"
Override ignored for property "env.BUILD_ID"
Override ignored for property "env.PROMPT_COMMAND"
Override ignored for property "env.JAVA17_HOME"
Override ignored for property "env.ANT_HOME"
Override ignored for property "env.TERM"
Override ignored for property "env.REPO"
Override ignored for property "env.HISTCONTROL"
Override ignored for property "env.HUDSON_SERVER_COOKIE"
Override ignored for property "env.BUILD_DISPLAY_NAME"
Override ignored for property "env.G_BROKEN_FILENAMES"
Override ignored for property "env.HUDSON_COOKIE"
Override ignored for property "env.USERNAME"
Importing file /path/home/jenkins/.jenkins/tools/deployScripts/lib/makePackage.xml from /path/home/jenkins/.jenkins/tools/deployScripts/build.xml
Overriding previous definition of reference to ant.projectHelper
parsing buildfile /path/home/jenkins/.jenkins/tools/deployScripts/lib/makePackage.xml with URI = file:/path/home/jenkins/.jenkins/tools/deployScripts/lib/makePackage.xml
Overriding previous definition of reference to ant.projectHelper
Importing file /path/home/jenkins/.jenkins/tools/deployScripts/lib/undeploy.xml from /path/home/jenkins/.jenkins/tools/deployScripts/build.xml
Overriding previous definition of reference to ant.projectHelper
parsing buildfile /path/home/jenkins/.jenkins/tools/deployScripts/lib/undeploy.xml with URI = file:/path/home/jenkins/.jenkins/tools/deployScripts/lib/undeploy.xml
Overriding previous definition of reference to ant.projectHelper
Importing file /path/home/jenkins/.jenkins/tools/deployScripts/lib/deploy.xml from /path/home/jenkins/.jenkins/tools/deployScripts/build.xml
Overriding previous definition of reference to ant.projectHelper
parsing buildfile /path/home/jenkins/.jenkins/tools/deployScripts/lib/deploy.xml with URI = file:/path/home/jenkins/.jenkins/tools/deployScripts/lib/deploy.xml
Overriding previous definition of reference to ant.projectHelper
Importing file /path/home/jenkins/.jenkins/tools/deployScripts/lib/retrieve.xml from /path/home/jenkins/.jenkins/tools/deployScripts/build.xml
Overriding previous definition of reference to ant.projectHelper
parsing buildfile /path/home/jenkins/.jenkins/tools/deployScripts/lib/retrieve.xml with URI = file:/path/home/jenkins/.jenkins/tools/deployScripts/lib/retrieve.xml
Overriding previous definition of reference to ant.projectHelper
Overriding previous definition of reference to ant.projectHelper
Build sequence for target(s) `retrieve' is [probe-proxy, proxy, retrieve]
Complete build sequence is [probe-proxy, proxy, retrieve, undeploy.undeploy, bulkRetrieve, GeneratePackageMembersStdObjCustomElements, clearPackage, makePackage, deploy.validate, retrieve.proxy, undeploy.GeneratePackageMembersLabels, generatePackageAll, undeploy, retrieve.bulkRetrieve, makePackage.clearPackage, validate, generatePackageLayout, undeploy.generateDestructiveChanges, retrieve.probe-proxy, validate_deploy, generateDestructiveChanges, removeCustomItemsFromPageLayouts, undeploy.generatePackageLayout, build, deploy.deploy, deploy.validate_deploy, undeploy.removeCustomItemsFromPageLayouts, undeploy.generatePackageMembers, deploy.build, makePackage.makePackage, undeploy.GeneratePackageMembersStdObjCustomElements, GeneratePackageMembersLabels, retrieve.retrieve, undeploy.generatePackageAll, generatePackageMembers, deploy, ]

probe-proxy:
Probing host proxy.host.com
Host address = 10.10.10.10
host is reachable

proxy:
Override ignored for property "proxy.host"
Property "proxy.user" has not been set
Property "proxy.pass" has not been set
 [setproxy] Setting proxy to proxy.host.com:8080

retrieve:
parsing buildfile jar:file:/path/home/jenkins/jusr/Ant/apache-ant-1.9.4/lib/ant-salesforce.jar!/com/salesforce/antlib.xml with URI = jar:file:/path/home/jenkins/jusr/Ant/apache-ant-1.9.4/lib/ant-salesforce.jar!/com/salesforce/antlib.xml from a zip file

BUILD FAILED
/path/home/jenkins/.jenkins/tools/deployScripts/lib/retrieve.xml:24: Should provide a valid retrieve manifest 'unpackaged'.
    at com.salesforce.ant.RetrieveTask.execute(RetrieveTask.java:104)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.Main.runBuild(Main.java:851)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 second
fatal: pathspec '*' did not match any files
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to track)
error: src refspec master does not match any.
error: failed to push some refs to 'ssh://user@git.abc.com//server/repo/dev/environments/environment.git'
Build step 'Execute shell' marked build as failure
Sending e-mails to: test@test.com
Finished: FAILURE

Retrieve.xml file:

<?xml version="1.0"?>
<project name="retrieve" xmlns:sf="antlib:com.salesforce">

  <target name="probe-proxy">
    <property name="proxy.host" value="proxy.hostname.com"/>  

    <condition property="proxy.enabled">
      <and>
        <isset property="proxy.host"/>
        <isreachable host="${proxy.host}"/>
      </and>
    </condition>
  </target>

  <target name="proxy" depends="probe-proxy" if="proxy.enabled">
    <property name="proxy.host" value="proxy.hostname.com"/>  
    <property name="proxy.port" value="8080"/>
    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
      proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
  </target>


   <target name="retrieve" depends="proxy">
      <sf:retrieve username="${sf.username}" password="${sf.password}" serverurl="${sf.server}" retrieveTarget="code" unpackaged="code/package.xml"/>
    </target>

    <target name="bulkRetrieve">
        <sf:bulkRetrieve username="${sf.username}" password="${sf.password}" serverurl="${sf.server}" metadataType="${sf.metadataType}"  retrieveTarget="code" />
    </target>

</project>
  • 3
    It looks like you're missing the package.xml file. What are you using to build in Jenkins? Are you using Ant directly? – couchand Aug 19 '14 at 20:28
  • I don't see a package.xml file in any of the successful builds. I updated the original post with the complete console output if that helps. – john Aug 19 '14 at 21:19
  • Anyone have any ideas? – john Aug 21 '14 at 14:55
  • The contents of the retrieve.xml file might be helpful here. – FrankZ Aug 21 '14 at 15:42
  • I edited the original post to show the retrieve.xml file. Also, I do see a package.xml file in the path of home/jenkins/.jenkins/jobs/sandbox1/workspace/code along with a folder for each object/data being backed up. I do not see a package.xml or object folders in the path of home/jenkins/.jenkins/jobs/sandbox2/workspace/code. The only file in the sandbox2/workspace/code directory is .git. This is the one that is not working. The build is setup the exact same in jenkins with the only difference being the git repo and login information. They both use the same retrieve.xml file. – john Aug 22 '14 at 14:31
2

If your goal is to retrieve everything from the org, you need to provide a package.xml file that lists all metadata types. Here's the one I use for pulling down all unpackaged code:

https://github.com/SalesforceFoundation/Cumulus/blob/dev/lib/all_meta_types.xml

The following retrieve command is an example of how you would retrieve using the file as a manifest.

  <sf:retrieve 
    username="${sf.username}" 
    password="${sf.password}" 
    serverurl="${sf.serverurl}" 
    retrieveTarget="@{dir}/unpackaged" 
    unpackaged="lib/all_meta_types.xml"/>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.