Cannot use DevTest Jenkins Plugin in Workspaces with Subdirectories - A malformed file URI is provided, please check again.

book

Article ID: 223821

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

Currently we have the CA DevTest Jenkins Plugin installed in our Cloudbees Jenkins instance. Using the Plugin, we are able to successfully deploy a Virtual Service from a Marfile. However, we are only able to do so if the Marfile exists in the root directory of any given github project. This is not ideal, because we are currently integrating the DevTest Plugin with other Jenkins build types.

CA DevTest Jenkins Doc is here (https://techdocs.broadcom.com/us/en/ca-enterprise-software/devops/devtest-solutions/10-6/using/using-jenkins-plugin-for-service-virtualization.html) - does not help with this issue.

Example - An Identical .mar file, called "CP-PayerAPI.mar", exists in the root directory, as well as a sub directory called "svmarfiles".

1) Using the following code in Jenkins, the deployment of the CP-PayerAPI Virtual Service is Successful to the VSE running on host ch3qw606094

svDeployVirtualService host: 'machine1', marFilesPaths: "CP-PayerAPI.mar", port: '1505', secured: false, tokenCredentialId: 'devtest', useCustomRegistry: true, vseName: 'VSE'

2) Using the following code in Jenkins, the deployment of the CP-PayerAPI Virtual Service always Fails to deploy. The only change to the code was adding "svmarfiles" to the marFilesPaths - the marfile exists in both directories, but it fails to deploy from this sub-directory.

svDeployVirtualService host: 'machine1', marFilesPaths: "svmarfiles/CP-PayerAPI.mar", port: '1505', secured: false, tokenCredentialId: 'devtest', useCustomRegistry: true, vseName: 'VSE'

This gives the following error... Any help would be greatly appreciated.

Response body from DevTest is: {"id":1003,"message":"A malformed file URI is provided, please check again.","addInfo":"\r\ncom.itko.lisa.invoke.api.exception.BadRequestException: A malformed file URI is provided, please check again.\r\n\tat com.itko.lisa.invoke.ParameterUtils.getInputStream(ParameterUtils.java:84)\r\n\tat 


Cause

Code issue

Environment

Release : 10.6

Component : DevTest Plugins

Resolution

Making sure only single quotes used in the code and removing the word files from the subfolder name resolved this issue.

svDeployVirtualServicehost'machine1'marFilesPaths'DevTestSV/dev/Mars/CP-PayerAPI.mar',port'1505'securedfalsetokenCredentialId:'devtest'useCustomRegistrytruevseName'VSE'