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?
Thanks!
Please sign in to leave a comment.
You can do this by Build Script Interaction: https://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-artPublishing
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.
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.
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.