Custom build step file not added to artifact

Hello all,

My project has 5 build steps:
1. Get VCS
2. Run a PowerShell script to compile SASS files
3. Compile with MSBuild
4. Deploy to Octopus

When the 2nd build step is called I can see in the agent directory that the SASS files have been compiles to a Default.css file, like I want to. But then when the deployment is complete and I check the build artifact the file is not there, thus not published to Octopus deploy.

How can I manually add files to artifacts through a PowerShell script?


Comment actions Permalink

Do you mean with?

##teamcity[publishArtifacts '<path>']

I then get 2 artifacts, 1 with just Default.css and the actual nupkg. I need that file to go in the nuget package.

Comment actions Permalink

Hi Rogier,

I would suggest to create a separate build configuration for each task (Compile, Deploy, ...) and configure artifact dependencies. To create an appropriate NuGet package you can use NuGet Pack build step.

Comment actions Permalink

I fixed it by adding the css file to the project file in Visual Studio but ignoring it in Mercurial, and let the build step build the SCSS to CSS before the VS build.


Please sign in to leave a comment.