简体   繁体   English

使用 Jenkins Pipeline 将 PHP 部署到 Azure Web App 时出错

[英]Error when Deploy PHP to Azure Web App using Jenkins Pipeline

I'm stuck at the jenkins stage to deploy from github repo to azure web app.我被困在 jenkins 阶段,无法从 github repo 部署到 azure web 应用程序。

stage('Deployment to Staging')
    {
        azureWebAppPublish appName: 'app1', 
        azureCredentialsId: 'cred1', 
        filePath: '', 
        publishType: 'file', 
        resourceGroup: 'rg1', 
        slotName: '', 
        sourceDirectory: ''
    }

and the result is :结果是:

[Pipeline] End of Pipeline
java.lang.NoSuchMethodError: com.microsoft.azure.util.AzureBaseCredentials.serializeToTokenData()[B
    at com.microsoft.jenkins.appservice.util.AzureUtils.getToken(AzureUtils.java:24)
    at com.microsoft.jenkins.appservice.util.AzureUtils.buildClient(AzureUtils.java:28)
    at com.microsoft.jenkins.appservice.WebAppDeploymentRecorder.perform(WebAppDeploymentRecorder.java:168)
    at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
    at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:99)
    at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
    at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

what am i do wrong with this pipeline ?我在这条管道上做错了什么? i'm already set the credential with azure service princial and already verified.我已经使用 azure service princial 设置了凭据并且已经过验证。 really need your help真的需要你的帮助

i already found the solution.我已经找到了解决方案。 turns out need to downgrade the azure credential plugin.原来需要降级 azure 凭据插件。

before : 
jenkins version : 2.289.2
azure credential plugin version : 182.v3ccd4a755864

after :后 :

jenkins version : 2.289.2
azure credential plugin version : 4.0.6

to download the plugin manually, i'm using ClickMe and upload it to jenkins GUI.要手动下载插件,我正在使用ClickMe并将其上传到 jenkins GUI。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM