1
  1. When i'm trying to do azure devops release pipeline using function i'm getting bellow issues.
  2. copying and archive taskes i'm using
  3. In the azure function app deploy taks i'm using zip and "i configured additational deployment as "zip deploy" and "zip deploy with run from package"
  4. I configured WEBSITE_RUN_FROM_PACKAGE = 1 , WEBSITE_WEBDEPLOY_USE_SCM = true

1111-01-01T12:48:18.7320311Z ##[section]Starting: Azure Function App Deploy: XXXXXXXXXXXXXXX 1111-01-01T12:48:18.7434752Z ============================================================================== 1111-01-01T12:48:18.7434920Z Task : Azure Functions Deploy 1111-01-01T12:48:18.7434992Z Description : Update a function app with .NET, Python, JavaScript, PowerShell, Java based web applications 1111-01-01T12:48:18.7435114Z Version : 2.218.1 1111-01-01T12:48:18.7435174Z Author : Microsoft Corporation 1111-01-01T12:48:18.7435265Z Help : https://aka.ms/azurefunctiontroubleshooting 1111-01-01T12:48:18.7435348Z ============================================================================== 1111-01-01T12:48:19.9008284Z Got service connection details for Azure App Service:'XXXXXXXXXXXXXXX' 1111-01-01T12:48:21.1672101Z (node:2688) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. 1111-01-01T12:48:32.5957978Z Trying to update App Service Application settings. Data: {"WEBSITE_RUN_FROM_PACKAGE":"1"} 1111-01-01T12:48:32.5958428Z Deleting App Service Application settings. Data: ["WEBSITE_RUN_FROM_ZIP"] 1111-01-01T12:48:32.5959252Z App Service Application settings are already present. 1111-01-01T12:51:10.9128451Z Validating deployment package for functions app before Zip Deploy 1111-01-01T13:09:06.0866760Z Package deployment using ZIP Deploy initiated. 1111-01-01T13:27:01.3376109Z ##[error]Failed to deploy web package to App Service. 1111-01-01T13:27:01.3391569Z ##[error]To debug further please check Kudu stack trace URL : https://$XXXXXXXXXXXXXXX:***@XXXXXXXXXXXXXXX.scm.yyyyyyyyyyyyyyyyyyapps.com/api/vfs/LogFiles/kudu/trace 1111-01-01T13:27:01.3393869Z ##[error]Error: Error: Failed to deploy web package to App Service. Error: connect ETIMEDOUT x.x.x.x:443 1111-01-01T13:27:02.7308381Z Successfully added release annotation to the Application Insight : XXXXXXXXXXXXXXX 1111-01-01T13:27:03.5861517Z App Service Application URL: https://XXXXXXXXXXXXXXX.yyyyyyyyyyyyyyyyyyapps.com 1111-01-01T13:27:03.6006868Z ##[section]Finishing: Azure Function App Deploy: XXXXXXXXXXXXXXX

1 Answer 1

1

I tried the steps below to deploy Azure Functions with Azure DevOps pipeline.

Task 1:-

Created a build Pipeline by archiving files and Publish Artifact :-

Yaml pipeline script:-

# 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'

  

steps:

- task: DotNetCoreCLI@2

inputs:

command: 'build'

projects: '**/*.csproj'

arguments: '--output $(Build.BinariesDirectory)/publish_output --configuration Release'

  

- task: ArchiveFiles@2

inputs:

rootFolderOrFile: '$(Build.BinariesDirectory)/publish_output'

includeRootFolder: false

archiveType: 'zip'

archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'

replaceExistingArchive: true

  

- task: PublishBuildArtifacts@1

inputs:

PathtoPublish: '$(Build.ArtifactStagingDirectory)'

ArtifactName: 'drop'

publishLocation: 'Container'

Build task was successful and I received my Published Artifact like below:-

enter image description here

enter image description here

Task 2:-

Created a release pipeline to Deploy Function app to Azure:-

Added the Build artifact in the Release pipeline like below:-

enter image description here

enter image description here

Added Environment Variable set to Dev

enter image description here

In Azure functions Task selected Azure function app and valid subscription.

enter image description here

Added Environment Variable in App settings.

enter image description here

enter image description here

Now, I created the release and function got deployed in Function app like below:-

enter image description here

Portal:-

enter image description here

Additionally, I visited my function app > Advance tool > Tools > ZipDeployUI like below:-

enter image description here

The error connection time out might occur, Due to the poor network, firewall or a transient issue which can be fixed by retrying the deployment with correct steps. To get more insights check your kudu trace url in the error code.

Sign up to request clarification or add additional context in comments.

6 Comments

Thanks Siddhesh, I have tried same thing but I'm getting same exception.
Did you follow all the steps as mentioned above? Also, Which app service tier is your function app created in?
Isolated I1 App Service plan
Did you check your kudu trace url ? https://$XXXXXXXXXXXXXXX:***@XXXXXXXXXXXXXXX.scm.yyyyyyyyyyyyyyyyyyapps.com/api/vfs/LogFiles/kudu/trace 1111-01-01T13:27:01.3393869Z Any insights there?
@Dinesh Did you try to Redeploy the function app by following the solution here? In the Function App, go to the "Deployment Center" blade, and click on the "Disconnect" button on top. After that re-run the release pipeline. Reference learn.microsoft.com/en-us/answers/questions/382358/…
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.