Issue while deploying proxy via maven jenkins

sunilrai-1
Participant I

Firstly I have gone through the same kind of issue reported:

https://community.apigee.com/questions/55750/issue-while-deploying-proxy-via-maven-jenkins-howe.html

But used CI/CD pipeline for build and deployment.

We also faced similar issue when Assign message was having unwanted tag which it was caught during higher env deployment but it was not giving any issue in lower env.

same code was deployed by maven plugin in lower env and on day of higher env deployment the code deployment was failing.

our investigation points:

1. lower and higher env apigee on prem version is same : 4.19.01.00

2. code we store in source code repo, so same code was used for both env.

3. same maven plugin version used for deployment <apigee.edge.plugin.version>1.1.7</apigee.edge.plugin.version>

Error:

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.7:deploy (deploy-bundle) on project test: : MojoExecutionException: 400 Bad Request
[ERROR] {
[ERROR] "code" : "rest.ValidationFailure",
[ERROR] "message" : "Error occurred while validation of bean create-request.xml. Reason: - Schema validation failed. Cause : unexpected element (uri:\"\", local:\"Type\"). Expected elements are <{}Ref>,<{}Value>,<{}Template>,<{}Name>. Line number : 12. Column number : 15. File name : create-request.xml..",
[ERROR] "contexts" : [ ]

We were able to quickly fix this by removing the tag but is investigating further to avoid any future deployment failure, is it possible that this could be dependent on Maven version? apigee maven plugin?

0 2 286
2 REPLIES 2

@Sunil Rai - I dont think this is a Maven thing. The maven plugin is just the wrapper over the Apigee Management APIs. Can you confirm the tag you removed from the higher environment is not removed in the lower environment and it worked ? Also what is the Maven deploy option used in lower vs higher environment ? Like override, update, etc ?

Thanks Sai.

Here is the code snippet which was having Type tag extra:

    <AssignVariable>
        <Name>test</Name>
        <Template>{jsonPath($.test,message.content)}</Template>
        <Type>nodeset</Type>     
    </AssignVariable>

above code was getting deployed without any issue but when same source code we tried deploying in higher env this issue was caught.(Type tag not allowed)

maven deploy option is exact same for both env as we control using parent pom.

Dapigee_options = override

Dapigee.Config_Options = update