I'm trying to publish one of the output dll's to multiple artifact directories. But it seems, that teamcity is publishing that dll only to the last directory.
I would like to have something like this:
MyTool\MyTool.dll => MyZip.zip!/MyTool1/
MyTool\MyTool.dll => MyZip.zip!/MyTool2/
And on output:
MyZip.zip
MyTool1/MyTool.dll
MyTool2/MyTool.dll
But TeamCity returns me only last line:
MyZip.zip
MyTool2/MyTool.dll
Does anyone know how to publish one dll from builds output to multiple artifacts directories?
I spent some time looking for a workaround. It seems like the zip file is the sticking point. If it doesn't need to be zipped, then the following works fine:
MyTool\MyTool.dll => MyTool/MyTool1/
MyTool\MyTool.dll => MyTool/MyTool2/
Another option is to create a build step that moves the DLLs into the folder structure that you want, and then save that folder as the zipped artifact.
Related
I am trying to archive both the target/surefire-reports from my Maven project (easy), but in addition archive files that my project creates that are in the base workspace (csv report). Do I do something like this: target/surefire-reports/**/*, *.csv?
looks like you are doing the right thing.
my syntax is logs//.exec,logs//.log,obsQueue.txt, and it works.
make sure you that those files really exist in the workspace.
note that all archive files , are relative to the workspace.
let me know if I can help with this issue.
I currently have Team City set up on a server that does:
1) Build the Project
2) Run unit tests
3) Publish the project through IIS if successful
I want to add another step so that a .zip file is produced consisting of what was deployed to a directory on the server running team city. I am to understand that this is possible through artefacts but everything I've tried so far hasn't worked to give me the publish output.
I've tried options such as "** => C:\TC\Test.zip" but that includes the actual code implementation files.
Is there a way in which to publish a zip containing the publish result?
I've been trying this for hours without luck so far so hopefully I can get an answer.
You can use this to zip all files relative to the root of the build:
**/* => artifacts.zip
To zip all files relative to a folder named publish:
publish/**/* => artifacts.zip
If your published files are not included in the zip, they may have been published to someplace outside of the root of the build.
I need to exclude some files from TC's artifacts during my ASP MVC project's build. These files include web.debug.config files, but there are others as well.
At the moment the Artifact path setting in TC looks like this:
src/Project.Web/*.config => arch.zip
I need somehow to tell it to skip the web.debug.config file.
I tried this and doesn't work:
src/Project.Web/*.config => arch.zip
-src/Project.Web/*.debug.config
So, ideally I don't want these files from arch.zip that is created during the build.
Starting from TC10 it's possible. In your case it would be:
+:src/Project.Web/*.config => arch.zip
-:src/Project.Web/*.debug.config => arch.zip
This isn't possible the way you mentioned:
http://youtrack.jetbrains.com/issue/TW-5244
As a workaround until that issue is resolved, you can always create another build configuration with a snapshot dependency and an artefact dependency on your main build. Your main build outputs all of the files as artefacts. The configuration depending on this has an artefact dependency set to:
+:*.config => <replace with location>
-:*.debug.config
Then publish what you want from this configuration in the folder. Not ideal, but it will work.
For a .NET Developer, the Teamcity artifact paths are not very straightforward.
Per project I do, I have a folder called BuildTools and, within it, folders called Drops and Inputs (drops being the reports and outputs inputs being the config files for various command line apps).
BuildTools/Drops/NDependOut => GenericSolution/Drops/NDepend
Is this correct? BuildTools is from the root of the (custom) checkout dir, and then GenericSolution is from the root of the artifacts path (Called "Artifacts" folder).
The other problem I have is that the NDepend report has a lot of images etc in the same folder as the .html file. How would I upload this? Do I upload the entire folder (in which case, is the syntax above correct?)
In general this is right. TeamCity has an option to zip artifacts before publish. For that use the following syntax
Folder/folder/*/ => destfolder/archive.zip
Another trick is to use TeamCity service message to publish artifacts dynamically from build script.
I have the following sample / test configuration that has Hudson create a directory of empty folders. Its then instructed to archive everything within that folder, except it will not match empty folders and ends up archiving nothing. Whats more annoying is that Hudson does not alert you that nothing matches the search string "root**", but when it builds, it says nothing matches the search string.
(source: 86th.org)
We need Hudson to archive these empty folders for our installer since its expecting them. I fear this may not be possible because of the text "Files to archive".
At any rate, How can I configure Hudson to archive empty folders as an artifact.
You should create the artifact that you want in your build scripts, and then have hudson archive that file. So if you want a zip file that contains empty folders, do the appripriate zip command in your batch file or ant script. Then archive the output file.
Looking at the Hudson source code, it seems as if artifact archiving is meant to only match against files.
You might want to file a feature request or send an email to the USERS list, the Hudson team is pretty good about replying to requests and/or adding features in new releases.
I see three ways:
have your application NOT expect the folders but create them on demand.
or have the application create the folders at startup.
or you could just add dummy files in the folders :) just thinking out of the box.