TeamCity 9.x Documentation

[Documentation for Previous Versions]

Icon

You are viewing the documentation of TeamCity 9.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the [listing] to choose the documentation corresponding to your TeamCity version.

 

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: formatting, minor edits

...

The optional part starting with the => symbols and followed by the target directory name can be used to publish the files into the specified target directory. If the target directory is omitted, the files are published in the root of the build artifacts. You can use "." (dot) as a reference to the build checkout directory.

The target paths must not be absolute. Non-relative paths will produce errors during the build. 

...

You can use build parameters in the artifacts specification. For example, use "mylib-%system.build.number%.zip" to refer to a file with the build number in the name.

Examples:
Info

The same target_archive name can be used multiple times, for example:
*/*.html => report.zip
*/*.css => report.zip!/css/


Relative paths inside a zip archive can be used, if needed:
generatedresults\Resultresult1\Sub1Dir1\Sub2 Dir2 => archive.zip!generatedresults/Resultresult1/Sub1

You can use build parameters in the artifacts specification. For example, use "mylib-%system.build.number%.zip" to refer to a file with the build number in the name.

Examples:

Dir1

  • install.zip  — publish file named named install.zip in  in the build artifacts
  • dist  — publish the content of the the dist directory directory
  • target/*.jar  — publish all jar files in the the target directory directory
  • target/**/*.txt => docs  — publish all the txt files found in the the target directory  directory and its subdirectories. The files will be available in the build artifacts under the the docs directory directory.
  • reports => reports, distrib/idea*.zip  — publish reports directory as as reports and  and files matching matching idea*.zip from the  from the distrib directory  directory into the artifacts root.

Anchor
buildOptions
buildOptions

...