FATAL: The Gradle wrapper has not been found in these directories - jenkins

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

Related

Jenkins cannot find Jenkinsfile in Multibranch Project

I am configuring a multi-branch Jenkins pipeline using a Jenkinsfile at the root of the Project directory. Using the latest version of Jenkins 2.89.4. The build log follows:
Started by user USERNAME
Checking out teamconcert-URL Build Toolkit 4.0.4-bd-app-jboss-ci-dev into C:\Program Files (x86)\Jenkins\jobs\APP_JBoss\branches\aapp-jboss-ci-dev.su0lgd\workspace#script to read Jenkinsfile
RTC : checkout...
RTC Checkout : Source control setup
RTC Checkout : Accepting changes into workspace "Jenkins JBOSS CI" ...
Using build definition configuration.
Fetching files from repository workspace "Jenkins JBOSS CI".
RTC Checkout : Deleting fetch destination "E:\JENKINS_DATA\app-jboss-dev" before fetching ...
RTC Checkout : Fetching files to fetch destination "E:\JENKINS_DATA\app-jboss-dev" ...
RTC Checkout : Fetching Completed
ERROR: C:\Program Files (x86)\Jenkins\jobs\APP_JBoss\branches\app-jboss-ci-dev.su0lgd\workspace#script\Jenkinsfile not found
Finished: FAILURE
I do not understand what that last ERROR line means. Jenkins seems to be cloning the Jenkinsfile from source control, copying it into
C:\Program Files (x86)\Jenkins\jobs\APP_JBoss\branches\aapp-jboss-ci-dev.su0lgd\workspace and then attempt to read it back after cloning the entire repository into the build workspace at E:\JENKINS_DATA\app-jboss-dev.
Why can it not find the Jenkinsfile? I placed the Jenkinsfile at both the root and inside a script folder as well (just in case).
I am pulling from an RTC build definition.
I created a simple pipeline job as well (forget about the multi-branch setup). Jenkins is still unable to find the Jenkinsfile. (same issue).
I confirmed the repository is cloned correctly from RTC (version control system) as I can see the file in the directory and it is intact.
I edited the workspace directory and created this directory. Jenkins still wasnt able to find the file.
Jenkins is not copying anything into the C:\Program Files (x86)\Jenkins\jobs\APP_JBoss\branches\app-jboss-ci-dev.su0lgd\workspace file. No error message indicates that this step failed.
Can you please explain the dynamics of this process, I am out of ideas as to how to resolve this issue.

SonarQube runner made error on Jenkins

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

Unable to find build script on CloudBees Jenkins

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.

Jenkins build fails with 'Cannot find executable from the chosen Ant installation'

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.

Sonar Analysis using Jenkins can't find executable

I'm trying to trigger a sonar analysis of an android application through Jenkins and the Sonar Runner plugin. I've added a "Invoke Standalone Sonar Analysis" build step to my job that builds the code using Ant. When it gets to the Sonar Analysis step it fails and outputs the following:
------------------------------------------------------------------------
SONAR ANALYSIS FAILED
------------------------------------------------------------------------
FATAL: Sonar runner executable was not found for Sonar Runner 2.2.2
Build step 'Invoke Standalone Sonar Analysis' marked build as failure
The jenkins agent is a remote linux server where I have installed the sonar-runner in /opt/ and have updated appropriate SONAR_RUNNER_HOME and PATH variables.
Have I installed the runner correctly? I've looked at the documentation and other similar installation related questions but have not found what my problem could be.
Make sure to set the path of the runner correctly in Jenkins. It's the path without */bin in the end. That's a little tricky.
In the Manage Jenkins section, Configure... did you set the Sonar Runner Installations correctly? Check box Install automatically and install automatically the version from Codehaus.
Install Sonar Runner in the same server where Jenkins has been installed.

Resources