-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Jenkins pipeline step rtNpmPublish raise an error: java.nio.file.InvalidPathException: Illegal char <>> at index 0: #561
Comments
As there has been no changes to this and it used to work, it would be nice to know if something has changed with the rtNpmResolver, rtNpmDeployer, rtNpmCi or rtNpmPublish commands that would cause the issue. |
I also open a ticket https://www.jfrog.com/jira/browse/HAP-1476 where those commands are implemented. |
Read the code a bit and I have a question. At bigining of the rtNpmPublish, it run npm pack command, which should return the file name of the created npm package in NpmDriver.java, function pack(). This pack function should return the filename. When I run the npm pack command using Windows command line it returns al lot of outputs, starting with this ">" character and at the end, it outputs the actual file name. The pack() function only use trim() function to remove trailing/leading white characters. So the question is, did I miss something how the function pack() parse the created npm package name or is this the root cause of the bug? |
We found the problem in
Could you @eyalbe4 please, take a look at this. 👍 |
Just a note we proved that when no prepack script is defined in package.json (or produce output), the |
Conform, that when we run "npm run build", e.g. create a artifact package before "rtNpmPublish" step, the created artifact is published into Artifactory without any problem. |
Describe the bug
When publishing npm artifact into artifactory using Jenkins pipeline rtNpmPublish step it raise an error:java.lang.RuntimeException: java.nio.file.InvalidPathException: Illegal char <>> at index 0: > @xxxx/license-collector-js@1.1.2 prepack c:\build\workspace\workspace\xxx\xxx\license-collector
This was workin before we update Jenkins Artifactory pluging to version 3.13.1
To Reproduce
Create a Jenkins pipeline job, which build and publish build artifact
`pipeline {
agent {
label 'xxxx'
}
${DEFAULT_CONTENT}
${BUILD_LOG}
'''
}
fixed {
emailext recipientProviders: [developers(), culprits(), brokenBuildSuspects()],
to: "${params.emailNotifyRecipients}",
subject: '${DEFAULT_SUBJECT}',
body: '${DEFAULT_CONTENT}'
}
}
}`
Expected behavior
The build artifact is find out in Artifactory
Screenshots
xxxx-js-1.1.2.tgz
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at sun.nio.fs.AbstractPath.resolve(AbstractPath.java:53)
at org.jfrog.build.extractor.npm.extractor.NpmPublish.pack(NpmPublish.java:135)
at org.jfrog.build.extractor.npm.extractor.NpmPublish.execute(NpmPublish.java:91)
[wrapped] java.lang.RuntimeException: java.nio.file.InvalidPathException: Illegal char <>> at index 0: > @xxx/xxxx-js@1.1.2 prepack c:\build\workspace\workspace\test\xxx\xxxx
Versions
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: