Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude/Skip files in VSTS Build and release

We are in process of creating architecture for VSTS CI/CD to deploy our web app to our Azure App Services. We want to exclude the web.config while deploying it to the Azure server as we are directly modifying the web.config on the different environment. CI Tasks looks like this: CI Taks

CD Task: Deploy Azure App Service I am aware of other ways of updating the web.config https://docs.microsoft.com/en-us/vsts/build-release/tasks/transforms-variable-substitution, but in our case we want to skip the web.config file. I couldn’t find the option to skip file in during release in VSTS as mentioned in this thread How do I exclude the .cs files within an artifact from a vs-team-services CI build? Is there a way to exclude certain files while building and deploying the release?

like image 429
bluemoon522 Avatar asked Oct 25 '17 15:10

bluemoon522


People also ask

What is ArtifactStagingDirectory?

Build.ArtifactStagingDirectory. The local path on the agent where any artifacts are copied to before being pushed to their destination. For example: c:\agent_work\1\a. A typical way to use this folder is to publish your build artifacts with the Copy files and Publish build artifacts tasks. Note: Build.

Can a release pipeline publish artifact?

Publish pipeline artifacts is not supported in release pipelines. It is only supported in build pipelines, multi-stage pipelines, and yaml pipelines. You can publish your Artifacts at any stage of your pipeline using YAML or the classic editor.


1 Answers

Added -skip:objectName=filePath,absolutePath=web\.config in additional arguments. This skips updating the web.config file during deployment. Azure App Service Deployment

like image 136
bluemoon522 Avatar answered Sep 28 '22 04:09

bluemoon522