Skip to content

Instantly share code, notes, and snippets.

@Debjyoti30
Created January 14, 2025 07:54
Show Gist options
  • Select an option

  • Save Debjyoti30/bf16184bfd45e9c749ca19d030fb7d35 to your computer and use it in GitHub Desktop.

Select an option

Save Debjyoti30/bf16184bfd45e9c749ca19d030fb7d35 to your computer and use it in GitHub Desktop.
Pack and push Dockerfile as an Artifact
trigger:
- feature/POC-Demo
pool:
vmImage: 'ubuntu-latest'
variables:
packageName: 'LibraryContainerAppJob'
packageVersion: '$(Build.BuildNumber)'
sourcePath: 'ConsoleDemo.Library'
outputPath: '$(Build.ArtifactStagingDirectory)'
steps:
- task: ArchiveFiles@2
displayName: 'Package Dockerfile and related files'
inputs:
rootFolderOrFile: '$(sourcePath)'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(outputPath)/$(packageName).$(packageVersion).zip'
- task: PublishBuildArtifacts@1
displayName: 'Publish Package to Azure Artifacts'
inputs:
PathtoPublish: '$(outputPath)/$(packageName).$(packageVersion).zip'
ArtifactName: '$(packageName)'
publishLocation: 'AzureArtifacts'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment