Question

I recently came across a bug in the Artifactory TeamCity plugin, note that this only occurs in the the open source version of Artifactory.

After configuring the Artifactory plugin and creating a build step with Artifactory enabled, the following error will occur on build:

Build failure message received:
Error occurred while resolving published or build dependencies:
Illegal character in query at index 69:
http://ArtifactoryServerName:8081/artifactory/api/search/pattern?pattern=Requires Artifactory Pro.
Was it helpful?

Solution

This occurs because, with the OSS version, the 'Custom Build Dependancies' textbox in the build step is read-only and it constantly contains the “Requires Artifactory Pro.” string, which is being picked up as a custom build dependency.

So, on every build, it is looking for the following build dependency because of this:

http://ArtifactoryServerName:8081/artifactory/api/search/pattern?pattern=Requires Artifactory Pro.

Which will immediately cause this error:

enter image description here The workaround we found was to edit the xml of the build configuration that uses the Artifactory plugin, which can found under TeamCity Configuration Data folder:

TeamCity_ConfigurationData\config\projects\ProjectName\buildTypes\BuildConfiguration.xml

Locate the following tag from the build step configuration file, and remove the 'Requires Artifactory Pro.' value

param name="org.jfrog.artifactory.selectedDeployableServer.buildDependencies"

This is a temporary workaround until JFrog fix this bug, please note that re-saving the configuration in TeamCity will re-insert this value and cause the build to fail again

OTHER TIPS

The fix for this bug is included in the upcoming release (2.1.11) of the TeamCity Artifactory Plugin: https://www.jfrog.com/jira/browse/TCAP-205

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top