簡體   English   中英

使用 Jenkins Pipeline 將 PHP 部署到 Azure Web App 時出錯

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

我被困在 jenkins 階段,無法從 github repo 部署到 azure web 應用程序。

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

結果是:

[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

我在這條管道上做錯了什么? 我已經使用 azure service princial 設置了憑據並且已經過驗證。 真的需要你的幫助

我已經找到了解決方案。 原來需要降級 azure 憑據插件。

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

后 :

jenkins version : 2.289.2
azure credential plugin version : 4.0.6

要手動下載插件,我正在使用ClickMe並將其上傳到 jenkins GUI。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM