Java azure function project with spring boot deployment to azure portal

Rishabh Tayal 21 Reputation points
2021-03-05T15:55:15.46+00:00

We are running devops pipeline to build and deploy our Spring boot azure functions to azure portal. The devops pipeline runs successfully without any errors. However the functions on Azure doesn't show up. When deploying same code base from local VS Code, the functions are showing up on the portal.

Is this a known issue? Are we doing something wrong in the pipeline setup?

variables: 
  serviceConnectionToAzure: AzServiceConnection 
  appName: app_name 

trigger: 
  - main 

pool: 
  vmImage: ubuntu-16.04 

steps: 
  - task: Maven@3 
    inputs: 
      mavenPomFile: "pom.xml" 
      publishJUnitResults: true 
      testResultsFiles: "**/surefire-reports/TEST-*.xml" 
      javaHomeOption: "JDKVersion" 
      jdkVersionOption: "1.11" 
      mavenVersionOption: "Default" 
      mavenAuthenticateFeed: false 
      effectivePomSkip: false 
      sonarQubeRunAnalysis: false 

  - task: PublishPipelineArtifact@1 
    inputs: 
      targetPath: "$(Pipeline.Workspace)" 
      publishLocation: "pipeline" 

  - task: AzureFunctionApp@1 
    displayName: Azure Function App deploy 
    inputs: 
      azureSubscription: 'Azure subscription 1 (xxxxx)' 
      appType: 'functionAppLinux' 
      appName: 'app_name' 
      package: '$(Pipeline.Workspace)' 
      runtimeStack: 'JAVA|11' 
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,322 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pramod Valavala 20,591 Reputation points Microsoft Employee
    2021-03-08T12:30:07.32+00:00

    @Rishabh Tayal The Maven Task has the default goals set to package, which in the case of Azure Functions should be azure-functions:package instead.

    While an Azure DevOps sample isn't available in the docs, you could refer to this GitHub Actions workflow for details. Also, please feel free to raise a feature request on the Azure Pipelines doc to include a sample for Java as well.


0 additional answers

Sort by: Most helpful