[英]azure pipeline execute but failed to deploy mule app
I am trying to deploy an app using Azure pipeline我正在尝试使用 Azure 管道部署应用程序
azure.pipeline.yaml azure.pipeline.yaml
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
- group: Build-Variable-Group
- name: MAVEN_CACHE_FOLDER
value: $(Pipeline.Workspace)/.m2/repository
- name: MAVEN_OPTS
value: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
steps:
- task: CacheBeta@0
inputs:
key: pom.xml
path: $(MAVEN_CACHE_FOLDER)
displayName: Cache Maven local Repo
- task: DownloadSecureFile@1
name: settingsxml
inputs:
secureFile: 'settings.xml'
- task: Powershell@2
inputs:
targetType: 'inline'
script: |
New-Item -Type Directory -Force "${HOME}/.m2"
Copy-Item -Force "$(settingsxml.secureFilePath)" "${HOME}/.m2/settings.xml"
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
mavenAuthenticateFeed: true
publishJUnitResults: false
javaHomeOption: 'JDKVersion'
mavenVersionOption: 'Default'
effectivePomSkip: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'clean install package deploy $(MAVEN_OPTS) -DmuleDeploy -Dserver=$(server) -Denvironment=$(environment) -Dworkers=$(workers) -DworkerType=$(workerType) -Dapp.runtime=$(app.runtime) -Dapp.name=$(app.name)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Pipeline.Workspace)'
publishLocation: 'pipeline'
but getting this error :但收到此错误:
Caused by: java.lang.IllegalStateException: Deployment failed 2022-06-20T07:15:42.3435274Z at org.mule.tools.verification.cloudhub.CloudHubDeploymentVerification$CloudHubDeploymentVerificationStrategy.lambda$isDeployed$0 (CloudHubDeploymentVerification.java:56)
原因:java.lang.IllegalStateException:部署失败 2022-06-20T07:15:42.3435274Z at org.mule.tools.verification.cloudhub.CloudHubDeploymentVerification$CloudHubDeploymentVerificationStrategy.lambda$isDeployed$0 (CloudHubDeploymentVerification.java:56)
even in mule log getting the following error :即使在骡子日志中得到以下错误:
om.mulesoft.ch.services.agent.muleAgent.MuleAgentException: {"type":"class java.lang.IllegalArgumentException","message":"There was an error on the Mule Runtime while deploying the application clx-salesforceupsert-ifa. Error: Failed to deploy artifact [clx-salesforceupsert-ifa]. SAXException: Can't resolve http://www.mulesoft.org/schema/mule/salesforce/current/mule-salesforce.xsd , A dependency or plugin might be missing"}
om.mulesoft.ch.services.agent.muleAgent.MuleAgentException: {"type":"class java.lang.IllegalArgumentException","message":"部署应用程序 clx-salesforceupsert-ifa 时 Mule 运行时出错. 错误: 无法部署工件 [clx-salesforceupsert-ifa]. SAXException: 无法解析http://www.mulesoft.org/schema/mule/salesforce/current/mule-salesforce.xsd ,依赖项或插件可能失踪”}
The error message points to the problem:错误消息指向问题:
Can't resolve http://www.mulesoft.org/schema/mule/salesforce/current/mule-salesforce.xsd, A dependency or plugin might be missing"}
The application uses the Salesforce connector but the pom is missing the dependency for it.该应用程序使用 Salesforce 连接器,但 pom 缺少它的依赖项。 See https://docs.mulesoft.com/salesforce-connector/10.15/salesforce-connector-xml-maven for instructions on how to add it.
有关如何添加它的说明,请参阅https://docs.mulesoft.com/salesforce-connector/10.15/salesforce-connector-xml-maven 。
This issue is about building the Mule application with Maven without any relationship to the Azure pipeline.这个问题是关于使用 Maven 构建 Mule 应用程序,与 Azure 管道没有任何关系。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.