Getting the following error on Jenkins hosted by CloudBees:
FATAL: Unable to find build script at /scratch/jenkins/workspace/PROJECTNAME/deploy_ci/build.xml deploy
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE
That is executed by the following configuration in Jenkins
Build
Invoke Ant
Targets: -lib deploy_ci/lib/ant-salesforce.jar
Build File: deploy_ci/build.xml deploy
I can confirm that I have /deploy_ci/build.xml in my git repo.
If I'm doing something dumb, great. If there is a way to troubleshoot this more effectively on jenkins or cloudbees (new to both), I'm all ears.
Presumably the deploy belongs in Targets, not Build File.
Related
I have an npm project which I am using Jenkins for Continuous Integration. So I achieved build automation in Jenkins. Right now I am struggling how to push the build output to Oneops. I browsed couldn't find any solution.
Any help is appreciated.
It depends. Let's say you are deploying something like a React application that you are building in Jenkins. Maybe you run "npm run build" and your build creates an optimized application in the build/ subdirectory?
This is a process I run several times a day in response to a CI build.
I do this now in Jenkins, Jenkins run the build "npm run build."
I use a simple Maven deploy-file task to upload a ZIP archive to Nexus. (See the documentation for Maven deploy-file here: https://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html)
Then I configure the OneOps artifact component to download from Nexus - http://oneops.com/user/design/artifact-component
Admittedly, this may not be the NPM-focused way of publishing artifacts, but I found the using NPM to publish artifacts to Nexus had some limitations that I couldn't accept.
To take this a step further, I've configured by Jenkins build to call out to OneOps and trigger an environment variable update that triggers the deployment of code to OneOps.
When I use jenkins to build react-native app, it failed with below error:
[Gradle] - Launching build.
FATAL: The Gradle wrapper has not been found in these directories: /Users/arespan/.jenkins/workspace/ZSKQ
Build step 'Invoke Gradle script' marked build as failure
Finished: FAILURE
You need to checkout your app into the workspace using the git or other source control plugins.
I you want to build the app directly on your filesystem project using Jenkins, you can provide the path of your project relative to the jenkins job workspace as the "Root Build script" and "Wrapper Location" options
I use Jenkins and plugin SonarQube and Sonar runner.
For SonarQube Runner installation in Jenkins, it made Warning like this.
/home/abc/sonnar-runner-2.4 is not a directory on the Jenkins master (but perhaps it exists on some slaves)
of course I made /home/abc/ directory on the Jenkins Server.
so.. i ignore the warning and try to build tho..
it made error like this.
SONAR ANALYSIS FAILED
FATAL: SonarQube runner executable was not found for sonar-runner-2.4
Build step 'Invoke Standalone SonarQube Analysis' marked build as failure
Finished: FAILURE
i cant figure out this problem
is there anyone know how to solve this?
When you config SonarQube Scanner in Manage Jenkins --> Global Tool Configuration --> SonarQube Scanner, besides select "Install automatically", you also need to add a installer.
See screenshot here:
SonarQube Scanner --> Add Installer
I have created a Jenkins job which used to run in the master and I have the build.xml file in the master.
Now I have added a slave node and added the setting Restrict where this project can be run so that my job always runs on a particular slave.
Now my build jobs are failing and I can see:
[EnvInject] - Loading node environment variables.
Building remotely on demo_slave_inst2 (slave1) in workspace /root/slave/workspace/demo_job
FATAL: Unable to find build script at /root/slave/workspace/demo_job/autobvt.xml
Build step 'Invoke Ant' marked build as failure
Recording test results
Finished: FAILURE
This autobvt.xml file already exists in the master. So looks like I need to copy this file over to the slave node manually which does not looks like quite handy.
How I can instruct jenkins to copy this as part of the build?
Use "Copy data to Workspace" http://wiki.jenkins-ci.org/display/JENKINS/Copy+Data+To+Workspace+Plugin using which you can copy the files from master to slave and run them as a part of build process (No manual effort needed!)
I sorted the issue using the Copy to Slave plugin.
While executing a Jenkins job, I am getting this error message and the build fails.
FATAL: Cannot find executable from the choosen Ant installation "ANT"
Build step 'Invoke Ant' marked build as failure
Please help me; what is the actual problem?
The error message means what it says :)
You configured your Jenkins job to use a particular Ant installation, called "ANT".
But in the global Jenkins config, where you created this "ANT" installation, it seems you maybe provided a path that does not exist, or is not available on the machine the build is running on.
The easiest way to use Ant with Jenkins is to use the default "Install automatically" option, and let Jenkins download Ant for you when required.