Hi @Elu ,
This is achevable, you can create a separate Azure DevOps pipeline for each library’s website, and generate a zip file specifically for that site. Here are the steps to set up your pipeline:
- Create a Pipeline for Your Stack:
- Sign in to your Azure DevOps organization.
- Navigate to your project.
- Go to Pipelines, then select New Pipeline.
- Choose the location of your source code (either Azure Repos Git or GitHub).
- Select your repository.
Configure the pipeline for your specific stack (e.g., ASP.NET Core).
2.Add the Deployment Task:
- In your pipeline YAML file, add the Azure Web App task (
AzureWebApp
) to deploy to Azure App Service. - Alternatively, you can use the Azure App Service deploy task (
AzureRmWebAppDeployment
) for more complex scenarios. - Specify your Azure subscription, App type, App name, and Runtime stack based on your App Service app. Your YAML should look similar to the following:
trigger:
branches:
include:
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '3.x'
installationPath: $(Agent.ToolsDirectory)/dotnet
# Other build steps go here...
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
replaceExistingArchive: true
- task: AzureWebApp@1
inputs:
azureSubscription: '<your-subscription>'
appType: 'webApp'
appName: '<your-app-name>'
package: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
deploymentMethod: 'auto'
3.Repeat Steps for Each Library:
- Create a similar pipeline for each library’s website.
Customize the pipeline YAML for each site by adjusting the source code location, stack, and other parameters.
4.Release the Zip Files:
- After successful builds, you’ll have separate zip files for each site in the Artifacts folder.
- These zip files can be used in your release process.
Remember to replace placeholders like <your-subscription>
and <your-app-name>
with actual values specific to your environment.
Best,
Grace