I am running batch of collections via newman out of which few are failing due to assertion error. So I expect jenkins job to have unstable status at the end because of assertion failures but instead jenkins job is throwing success status.
How can I update Jenkins status to provide unstable status if any collection fails due to assertion error.
Not sure how you implemented your job but when I configured Jenkins it worked as expected. In your Jenkins job use Execute shell build step with following command:
newman run test.postman_collection.json
Newman will return 0 exit code on success and job will be green. On failure exit code will be 1 and job will fail.
Related
Am trying to generate the basic nodes- PartyA, PartyB and Notary on Ubuntu 14 by running ./gradlew deployNodes or even ./gradlew clean deployNodes. The error reads:
... still waiting. If this is taking longer than usual, check the node logs.
Error while generating node info file /cordapp-template-java/build/nodes/Notary/logs
Error while generating node info file /cordapp-template-java/build/nodes/PartyB/logs
Error while generating node info file /cordapp-template-java/build/nodes/PartyA/logs
Task :deployNodes FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':deployNodes'.
Error while generating node info file. Please check the logs in /cordapp-template-java/build/nodes/Notary/logs.
Error while generating node info file. Please check the logs in /cordapp-template-java/build/nodes/Notary/logs.
The error logs do not provide any indication of error.
I have personally run into the above question myself. From what I saw, it seems it was a random incident on the Unix based machine.
The issue was resolved after I moved the project to the different location. It is absurd. But I have never ran into this issue ever again.
I'm following the CorDapp example tutorial from the main website and am running into problems when trying to run the example RPC client via the command line on Linux
When running the gradle task ./gradlew runExampleClientRPCJava , I get the following errors.
> Task :java-source:runExampleClientRPCJava
I 13:47:55 1 RPCClient.logElapsedTime - Startup took 7722 msec
Exception in thread "main" ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:787)
at net.corda.client.rpc.internal.RPCClientProxyHandler.start(RPCClientProxyHandler.kt:191)
at net.corda.client.rpc.internal.RPCClient$start$1.invoke(RPCClient.kt:123)
at net.corda.client.rpc.internal.RPCClient$start$1.invoke(RPCClient.kt:86)
at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:191)
at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:183)
at net.corda.client.rpc.internal.RPCClient.start(RPCClient.kt:109)
at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:135)
at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:120)
at com.example.client.ExampleClientRPC.main(ExampleClientRPC.java:38)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':java-source:runExampleClientRPCJava'.
> Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
I can see that it can't connect to any of the servers. Does anyone know why this is and how to solve it? Has anyone run into the same problem?
The error message indicates that the client is not able to connect to the node in question. This is most likely because the node it is trying to connect to has failed to start.
Try restarting the node and trying to connect again.
I am using grunt-mocha-istanbul and have a task which runs the coverage through set of test files. The reporter is set to mocha-junit-reporter which generates the mocha test results XML file and the coverage report formats are set to cobertura and html.
For some reason, an error in the tests causes the whole task to fail and not just to get details on the failed test in the end report.
I ran the grunt task using --stack argument which produced the following:
Error: Task "mocha_istanbul:coveralls" failed.
at Task.<anonymous> (~\node_modules\grunt\lib\util\task.js:205:15)
at null._onTimeout (~\node_modules\grunt\lib\util\task.js:241:33)
at Timer.listOnTimeout (timers.js:92:15)
As you can see, this hides the original error somehow.
I defined a separate task to just run the tests and saw the issue but it has nothing to do with how the test execution in terms of callbacks gets handled.
So my question is, how can I intercept such propagated exceptions and provide more detailed information on what actually happened?
I have been successfully running a build definition against a dotnet core web application for months now but the build has started to fail. The error occurs when trying to run a dotnet restore command on my projects.
https://i.imgur.com/4EioYjr.png
I am getting the following error when the restore task runs:
Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-
flatcontainer/netcore.mailkit/index.json'.
Response status code does not indicate success: 504 (Gateway Timeout).
Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-
flatcontainer/netcore.mailkit/index.json'.
Response status code does not indicate success: 504 (Gateway Timeout).
I have manually run the dotnet restore command on my local machine and do not get the error.
Has anyone experienced something like this before in VSTS?
Thanks
This looks like it was a Microsoft issue.
http://blogs.msdn.microsoft.com/vsoservice/?p=15195
https://developercommunity.visualstudio.com/content/problem/129183/getting-504-gateway-timeout-on-hosted-vs2017-agent.html
I am getting below error while building Corda Version 1 (branch name - release-V1)
Task :core:test
net.corda.core.flows.ContractUpgradeFlowTest > 2 parties contract upgrade using RPC FAILED
java.util.concurrent.TimeoutException at ContractUpgradeFlowTest.kt:123
329 tests completed, 1 failed
FAILURE: Build failed with an exception.
Please help...
You can build the project without running the tests by using the command ./gradlew build -x test or gradlew.bat build -x test.
The integration tests can occasionally time-out, so I wouldn't be concerned by this issue. We are working to fix this.
In general, you shouldn't need to build Corda itself. The binaries for release-V1 are published to Maven, so will be downloaded automatically. You should probably work from the templates:
https://github.com/corda/cordapp-template-java
https://github.com/corda/cordapp-template-kotlin