Running gradle resulting in error on Jenkins - shell

I'm trying to run a Jenkin's job (which is hosted on AWS).
If i try to run the gradlew command from ssh / command line it works just fine.
But When I try to run the Jenkins job with same commands which I used in commandline then its failing with following error:
Please HelP;
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type FileCollectionSnapshotterRegistry using TaskExecutionServices.createFileCollectionSnapshotterRegistry().
> Could not create service of type CachingFileHasher using TaskExecutionServices.createFileSnapshotter().

Related

How do I bypass this incompatible gradle init script?

I'm running an installer built with install4j that uses an embedded version 2.3 of gradle which is pretty much outdated. The service account that runs the installer on Windows Server has a gradle init script in its home directory that uses functions that are not supported in Gradle 2.3. The error is :
FAILURE: Build failed with an exception.
* Where
Initialization script 'C:\Users\***\.gradle\init.gradle' line: 6
* What went wrong
Could not find method pluginManagement() for arguments
The installer doesn't need this gradle init script. However, it can't be deleted as it is required to build other projects.
I tried to bypass this gradle init script by running the installer as SYSTEM user with psexec using the following command :
psexec -s installer.exe
It works fine in a cmd prompt when I have a remote desktop session opened with the service account, but it doesn't run inside Jenkins. The error is :
The handle is invalid
I read in this answer that it could be due to some security restriction on Windows:
PSEXEC - "The Handle is invalid" When running the command as System User
Also it doesn't seem to be possible to bypass a gradle init script:
How to skip Initialization Scripts when executing gradle build

Karate-Jenkins- ERROR com.intuit.karate - . getting this error only when i run from jenkins

iam running my karate code from Jenkins. where ia, getting below error.
ERROR com.intuit.karate - evaluation of 'karate-config.js' failed: javascript function call failed: ReferenceError: "karate" is not defined .
karate config file keeps on running.
iam using mvn test command to run the job.. even I have tried in Jenkins machine and mvn command works. only in through Jenkins iam getting issue.
Try to upgrade java version in Jenkins server.

How to show Docker errors in Bamboo?

I'm currently using Docker for Windows with Bamboo. I'm running into the problem, that when a Docker task fails, the error log only shows that exact message, that the task failed. But it doesn't show the error message from within Docker, like compilation errors, access denied or out of memory. Is there any way to get to these error messages?
You can setup a task in the "Final tasks" area of your job. This job will execute regardless of whether the tasks in the job failed or not.
Depending on how you are running Docker in Bamboo you can make this a Docker task or a script task and use the Docker logs command to output the logs from the container. This should tell you why the container failed to run (e.g., build, run-time error, initialization failure).
Docker Logs CLI

OpenWhisk build failure in local vagrant

Attempting to build my local openwhisk instance using the provided VagrantFile. I am using the ephemeral CouchDB container as my datasource.
During ant clean build deploy I get the following exceptions:
BUILD FAILED
/home/vagrant/openwhisk/build.xml:55: The following error occurred while executing this line:
/home/vagrant/openwhisk/build.xml:99: exec returned: 5
Further up the logs I see the following repeated under the installCatalog.sh section:
[exec] error: The supplied authentication is invalid
I've verified that the couchdb credentials in my cloudant-local.env are correct by executing some test curl commands. Not sure what other authentication credentials it could be complaining about. Any ideas?
http://dumptext.com/6QDOWNE3
When you use an ephemeral Couch instance, you need to start it after ant clean build and before deploy. Further, every time you start the container, you have to run the script tools/db/createImmortalDBs.sh to initialize the authentication store.
ant clean build
tools/db/couchdb/start-couchdb-box.sh ...
tools/db/createImmortalDBs.sh
ant deploy
BTW, Did you mean couchdb-local.env?

Is there a way to open an interactive Command Prompt from a service?

When I try to execute "vstest.console.exe" file in Jenkins CI (service mode), it responses
Error: Could not start test run for unit tests for Windows Store app:
Unit tests for Windows Store apps cannot be run from a service or non
interactive process. Please run unit tests from an interactive
process..
However it will be able to run successful if I execute the same command from a Command prompt.
So I want to ask if there is a way to open Command Prompt from a service such as Jenkins CI.
I have tried with "start ExecuteVSTest.bat /I /K /REALTIME" but the result is still the same.
I couldn't find a way to open Command Prompt from a service. However I am able to resolve the problem between Jenkins CI and "vstest.console.exe".
We just need to deploy Jenkins from the WAR file via Tomcat server instead of installing Jenkins service native package.
Since the Tomcat is running in the console mode so Jenkins CI won't have the same trouble when executing "vstest.console.exe" as when it run in service mode.

Resources