Yaml based Build Pipeline For .Net 8 isolated Azure Function.

Kumar Ritesh 80 Reputation points Microsoft Employee
2024-07-25T05:49:16.52+00:00

Hi Everyone,

Can someone please share sample yaml for build pipeline for .Net 8 isolated Azure function

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,347 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Luan Gabriel Duarte 0 Reputation points
    2025-01-10T15:49:29.2166667+00:00

    I need it too!

    0 comments No comments

  2. Kumar Ritesh 80 Reputation points Microsoft Employee
    2025-01-10T15:59:01.4266667+00:00
    name: $(Date:yyyyMMdd).$(Rev:r)
    variables:
      - group: ESRP-5c8***
      - name: BuildConfiguration
        value: release
      - name: system.debug
        value: false
    resources:
      repositories:
        - repository: 1esPipelines
          type: git
          name: 1ESPipelineTemplates/1ESPipelineTemplates
          ref: refs/tags/release
    trigger: none
    parameters:
      - name: debug
        type: boolean
        default: false
        values:
          - false
    extends:
      template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
      parameters:
        pool:
          os: Windows
          name: BuildProd-m3t-Win2022-Mms-1ESPT-wus3
        stages:
          - stage: Build
            jobs:
              - job: Job_1
                displayName: Agent job
                templateContext:
                  outputs:
                    - output: pipelineArtifact
                      targetPath: $(Build.ArtifactStagingDirectory)
                      displayName: Publish Artifact
                steps:
                  - checkout: self
                    clean: true
                    fetchDepth: 0
                  - task: GitVersionVnext@4
                    displayName: GitVersion
                    enabled: False
                  - task: DotNetCoreCLI@2
                    displayName: Restore
                    inputs:
                      command: restore
                      projects: <Relative path of project>.csproj
                      selectOrConfig: config
                      nugetConfigPath: <Nuget Config Folder Path>/NuGet.Config
                  - task: DotNetCoreCLI@2
                    displayName: Build
                    inputs:
                      projects: <Path to project>.csproj
                      arguments: --configuration $(BuildConfiguration)
    
                  - task: CopyFiles@2
                    displayName: Copy to drop Folder
                    inputs:
                      SourceFolder: 'Application\Ess.Insights.Portal.ManualSignService\Ess.Insights.Portal.ManualSignService\bin\Release\net8.0'
                      Contents: '**'
                      TargetFolder: '$(build.artifactstagingdirectory)\ManualSignService'
                      CleanTargetFolder: true
                  - task: ArchiveFiles@2
                    displayName: Create Zip Package
                    inputs:
                      rootFolderOrFile: '$(build.artifactstagingdirectory)\ManualSignService'
                      includeRootFolder: false
                      archiveType: 'zip'
                      archiveFile: '$(Build.ArtifactStagingDirectory)/Ess.Insights.Portal.ManualSignService.zip'
                      replaceExistingArchive: true
                  - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@2
                    displayName: Run Roslyn Analyzers
                    enabled: False
    
    
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.