Search code examples
continuous-integrationazure-devopscontinuous-deployment

What is an artifact, and how do I separate my projects?


Just got started with CI/CD with VSTS. And the thing is that I have one project that has several projects. I've got a web site, I've got an API and I got an Azure Functions project.

VSTS build setup takes the commit and builds it. The GIT project is the whole solution (with all the project).

How do I go about separating the individual projects at deployment, since each project has its own destination in Azure. Do I some way produce several artifacts? Do I do something with the artifact?

The build step is "build ***.sln". Do I change it to build the csproj and that way get several artifacts?


Solution

  • Artifacts are the files produced by build as output of the build.

    You can build as a single solution and don't have to build each individual project separately, even though it is possible for you to do that. For your question about creating multiple build artifacts, yes it is possible to do so.

    You can use multiple "Copy Files" tasks to copy the files to a staging directory and publish the individual folders in staging directory as artifacts using multiple publish artifact steps in build. Then in release management you can filter for a given artifact for each agent/deployment group phase.

    enter image description here

    Refer post here on usage of multiple Publish Artifact steps in a build. Also this post might be useful for you to understand more possibilities. Refer this thread as well.