Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AzureFunctionApp@2 added support for Flex Consumption #1

Closed
sven5 opened this issue Dec 20, 2024 · 8 comments
Closed

AzureFunctionApp@2 added support for Flex Consumption #1

sven5 opened this issue Dec 20, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@sven5
Copy link

sven5 commented Dec 20, 2024

The AzureFunctionApp@2 pipeline task now supports FC1 plans.

See doc: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-function-app-v2?view=azure-pipelines

@erwinkramer erwinkramer self-assigned this Dec 20, 2024
@erwinkramer
Copy link
Owner

Thanks i will update this.

@erwinkramer
Copy link
Owner

erwinkramer commented Dec 20, 2024

@sven5 i updated the page based on the documentation. I cannot verify if it also works with the build steps i have written down, as I don't have access to my test setup at the moment. Would you happen to know?

@erwinkramer erwinkramer added the enhancement New feature or request label Dec 20, 2024
@erwinkramer
Copy link
Owner

I had no succes implementing the original task, and also i stumbled on (slightly related) issues: Azure/azure-functions-host#10714 and Azure/azure-functions-host#10643 .

@sven5
Copy link
Author

sven5 commented Jan 6, 2025

Hi @erwinkramer,
sorry for being late, I was on holidays.

These are my build steps:

        steps:          
          - task: DotNetCoreCLI@2
            displayName: 'dotnet build $(buildConfiguration)'
            inputs:
              command: 'build'
              projects: ${{ parameters.buildSolution}}
              arguments: '--configuration $(buildConfiguration)'

          - task: DotNetCoreCLI@2
            displayName: 'dotnet publish $(buildConfiguration)'
            inputs:
              command: publish
              projects: ${{ parameters.buildSolution}}
              publishWebProjects: false
              arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)'
              zipAfterPublish: true

          - task: PublishBuildArtifacts@1
            displayName: 'Publish Build Artifacts'
            inputs:
              PathtoPublish: '$(Build.artifactStagingDirectory)'
              ArtifactName: '${{ parameters.publishArtifactName }}'
              publishLocation: 'Container'

          - task: AzureFunctionApp@2
            displayName: 'Deploy to Function App'
            inputs:
              azureSubscription: ${{ parameters.azureServiceConnection }}
              appType: ${{ parameters.appType }}
              resourceGroupName: ${{ parameters.azureResourceGroupName }}
              appName: ${{ parameters.funcName }}
              isFlexConsumption: ${{ parameters.isFlexConsumption }}
              package: '$(Build.ArtifactStagingDirectory)/**/*.zip'
              

The PublishBuildArtifacts is optional, we just wanna see the output of the publish step.

@erwinkramer
Copy link
Owner

Cool. What's the appType there?

@erwinkramer
Copy link
Owner

Looks like it's working for me now as well. I updated the readme accordingly. Thanks.

@sven5
Copy link
Author

sven5 commented Jan 6, 2025

Cool. What's the appType there?

it's functionAppLinux

@erwinkramer
Copy link
Owner

Cool. What's the appType there?

it's functionAppLinux

Yes thanks, already added that value in the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants