I am getting error in Jenkins at final step of build.
Error is:Failed to deploy artifacts, could not transfer artifact.
Failed to transfer file Artifactory URL.
Return code is 400 -> bad request.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project :
Failed to deploy artifacts: Could not transfer artifact from/to snapshots (Artifactory URL): Failed to transfer file: Artifactory URL/project.jar.
Return code is: 400, ReasonPhrase: Bad Request. -> [Help 1]
Please let me know what may cause this issue. Any help would be appreciated.
Related
I'm trying to use Owasp Zap(V2.11.1) within jenkins pipeline.
I need to scan a simple Url for this example: https: //MyHost:MyPort/ANY_PATH
After downloading the Jenkins Zap plugin, I executed the build, but it seems that the scan doesn't start.
This is the my Jenkins pipeline:
pipeline {
agent any
stages {
stage('Zap Test') {
steps {
script {
startZap(host: "127.0.0.1", port: 8080, timeout:30000, zapHome: "C:\\Program Files\\OWASP\\Zed Attack Proxy", allowedHosts:['https://igfscg.netsw.it:18080/IGFS_CG_WEB/app/cc/main/show?referenceData=B6345DAEC2AFF5A1FD8E84F8FC745E50'])
}
}
}
}
post {
always {
script {
archiveZap(failAllAlerts: 10, failHighAlerts: 0, failMediumAlerts: 0, failLowAlerts: 0, falsePositivesFilePath: "zapFalsePositives.json")
}
}
}
}
This is the Jenkins log file where it show that Zap is started, but seems also to attempt to connect to Zap
10027 [ZAP-daemon] INFO org.zaproxy.addon.oast.services.callback.CallbackService - Started callback service on 0.0.0.0:62554
10031 [ZAP-daemon] INFO org.zaproxy.zap.extension.dynssl.ExtensionDynSSL - Creating new root CA certificate
11205 [ZAP-daemon] INFO org.zaproxy.zap.extension.dynssl.ExtensionDynSSL - New root CA certificate created
11209 [ZAP-daemon] INFO org.zaproxy.zap.DaemonBootstrap - ZAP is now listening on
127.0.0.1:8080
11624 [ZAP-cfu] INFO org.zaproxy.zap.extension.autoupdate.ExtensionAutoUpdate - There is/are 24 newer addons
zap: Attempting to connect to ZAP at 127.0.0.1:8080
zap: Archiving results... zap: Checking results... zap: Deleting temp directory: C:\Users\a.carnevali.jenkins\workspace\igfs_cg_testing\zaptemp.tmp3371682578955130815
zap: Failed to delete temp directory. Unable to delete 'C:\Users\xxxxxx.jenkins\workspace\igfs_cg_testing\zaptemp.tmp3371682578955130815'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts. (Discarded 15 additional exceptions)
Moreover there are some additional messages coming from the windows console where I start Jenkins
INFO o.a.h.impl.execchain.RetryExec#execute: Retrying request to
{}->http://127.0.0.1:8080
INFO o.a.h.impl.execchain.RetryExec#execute: I/O exception
(java.net.SocketException) caught when processing request to {}->
http://127.0.0.1:8080: Software caused connection abort: recv failed
Could you please help on this?
this is my 1st question, any help will be greatly appreciated.
I need to import test results from Jenkins to Xray.
To do so I:
set up Xray for JIRA Jenkins Plugin;
configured Xray Server/DC integration with Jenkins;
tested connection and it's successful;
went to my Jenkins project configuration and set up post-build Action 'Xray:Result Import Task';
under parameters of 'Xray:Result Import Task' I was trying to specify Execution Report File (file path with file name).
AND here is my question: what exact input is supposed to be here?
I tried URL to my test execution issue already created in Xray, testng.xml. myTestExecution.xml file - nope. Doesn't work. I'm missing smthng here((
Can't get what is meant by:
file path with file name.
My Results Import task fails with error below.
Starting XRAY: Results Import Task...
##########################################################
#### Xray is importing the execution results ####
##########################################################
0 files found. Please make sure the path provided is valid and is not a directory
ERROR: Build step failed with exception
com.xpandit.plugins.xrayjenkins.exceptions.XrayJenkinsGenericException: 0 files found. Please make sure the path provided is valid and is not a directory
at com.xpandit.plugins.xrayjenkins.Utils.FileUtils.getFiles(FileUtils.java:180)
at com.xpandit.plugins.xrayjenkins.task.XrayImportBuilder.perform(XrayImportBuilder.java:563)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:112)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1919)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:428)
Build step 'Xray: Results Import Task' marked build as failure
Finished: FAILURE
set up Xray for JIRA Jenkins Plugin;
configured Xray Server/DC integration with Jenkins;
tested connection and it's successful;
went to my Jenkins project configuration and set up 2 post-build Actions:
'Publish TestNG Results'
TestNG XML report pattern: **/target/surefire-reports/testng-results.xml
'Xray:Result Import Task':
Jira Instance: Jira Instance;
Format: TestNG XML;
Execution Report File (file path with file name): **/testng-results.xml (generated by 'Publish TestNG Results' action);
Test Execution Key: JIRA-123 (Jira Test execution issue);
In my jenkins file failing at below command
Code :
stage('Release') {
steps {
sh '/opt/maven/bin/mvn --batch-mode release:clean release:prepare release:perform'
}
}
stage('Update Rel') {
steps {
sh 'git push https://xxxx:password#github.com/dxtrsd/maven-multi-module-example.git HEAD:master'
}
Build failure :
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.0-M1:prepare (default-cli) on project multi: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] fatal: could not read Username for 'https://github.com': No such device or address
[ERROR] -> [Help 1]
[ERROR]
Following "Bootstrap your CI with Jenkins and GitHub" from Michael Wanyoike, you need to have entered your GitHub credentials first:
Then you need to select that credential under your URL (the image shows a SSH URL, but in your case, use the HTTPS URL)
I fixed this issue with providing user and password in developer connection url in block in the POM.xml file
I have requirement to implement CI.Following are jenkins configuation details:
Jenkins server 32-bit (window 7)
Maven Integration plugin(version3.0)
Ant Plugin(Version 1.7)
Build Timeout(Version 1.19)
SQLPlus Script Runner( version 1.0.9)
Subversion Plug-in (Version 2.9)
I have following job configutaion:
Configure SVN Repository in Source Code Management step
On Build Environment ->Pre Steps -> using build timeout plugin->Sql script runner for oracle database.
When I executed the job i received following error but if i tried to excute Sql script runner without using build timeout it run smoothly :
ERROR: Build step failed with exception
java.lang.ClassCastException: hudson.maven.MavenModuleSetBuild cannot be cast to hudson.model.Build
at hudson.plugins.build_timeout.BuildStepWithTimeout.perform(BuildStepWithTimeout.java:73)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:736)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:945)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:683)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:496)
at hudson.model.Run.execute(Run.java:1737)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:421)
Build step 'Run with timeout' marked build as failure
Finished: FAILURE
I have tried build timeout with ant script same error message is coming.Please suggest.
Thank you.
Maven project in Jenkins results in FAILURE even though I am not publishing any pmd, checkstyle results. All of them are "not checked" in job configuration.
Compilation is actually success, but because of this error I am unable to trigger following job.
Error is:
[ANALYSIS-COLLECTOR] Skipping publisher since build result is FAILURE
Finished: FAILURE