Questions about 'Publishing Artifacts while the Build is Still in Progress'

This is a new feature of TeamCity 3.1, and I understand the documentation is still under construction. I thought I'd post my questions here.

For those of you that want to read the docs, they are here:
http://www.jetbrains.net/confluence/display/TCD3/BuildScriptInteractionwithTeamCity#BuildScriptInteractionwithTeamCity-artPublishing

In order to make artifacts available while the build is running I'm to output the following string during the build process:
##teamcity[publishArtifacts '<path>']

My questions:
1. I have several artifact folders in some builds, i.e 'Output\Bin,' 'Output\Web,' 'Output\Docs' ... What do I put in the path, just 'Output' or each folder in turn?

2. How many times can I send this to TeamCity? Once for each folder that's complete? Once per build?

3A. If another build relies on the 'Output\Bin' and I output that, this means the first build can continue to build the 'Output\Docs' and the second will start?
3B. The general version of this question is, when a build depends on only one artifact folder from a previous build, does it know when this folder is available, or does it have to wait for the entire build to finish regardless?

Keep up the fantastic work!

2 comments

Hello Ryan,

1. I have several artifact folders in some builds, i.e 'Output\Bin,'
'Output\Web,' 'Output\Docs' ... What do I put in the path, just 'Output'
or each folder in turn?


The syntax of this path is the same as you would use in the TeamCity UI.
Read more about it here:
http://www.jetbrains.net/confluence/display/TCD3/Build+Artifact

2. How many times can I send this to TeamCity? Once for each folder that's
complete? Once per build?


You can send this message as many times as you want. Every time when this
message occurs TeamCity will start to publish artifacts in the background
process. When build finishes artifact paths specified via TeamCity UI will
be processed too.

3A. If another build relies on the 'Output\Bin' and I output that, this
means the first build can continue to build the 'Output\Docs' and the
second will start?
3B. The general version of this question is, when a build depends on only
one artifact folder from a previous build, does it know when this folder
is available, or does it have to wait for the entire build to finish
regardless?


TeamCity currently cannot start a dependent build if artifacts on which this
build depends appear. However you can configure TeamCity to trigger a build
if a build of some specific configuration finishes.


--
Pavel Sher
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"



"Ryan Maki" <no_reply@jetbrains.com> wrote in message
news:31121564.1204829973731.JavaMail.itn@is.intellij.net...

This is a new feature of TeamCity 3.1, and I understand the documentation
is still under construction. I thought I'd post my questions here.

>

For those of you that want to read the docs, they are here:
http://www.jetbrains.net/confluence/display/TCD3/BuildScriptInteractionwithTeamCity#BuildScriptInteractionwithTeamCity-artPublishing

>

In order to make artifacts available while the build is running I'm to
output the following string during the build process:
##teamcity[publishArtifacts '<path>']

>

My questions:
1. I have several artifact folders in some builds, i.e 'Output\Bin,'
'Output\Web,' 'Output\Docs' ... What do I put in the path, just 'Output'
or each folder in turn?

>

2. How many times can I send this to TeamCity? Once for each folder that's
complete? Once per build?

>

3A. If another build relies on the 'Output\Bin' and I output that, this
means the first build can continue to build the 'Output\Docs' and the
second will start?
3B. The general version of this question is, when a build depends on only
one artifact folder from a previous build, does it know when this folder
is available, or does it have to wait for the entire build to finish
regardless?

>

Keep up the fantastic work!



0

That answers my questions. I am already using dependent builds to trigger a build, I mostly wondered at what level of detail the artifacts were used once the build had been triggered. I've been using it today and the builds still trigger once the previous build has completed.

I think I'll push the artifact publishing in front of the unit testing so my QA scripts can get at the latest versions quickly.

Thanks!

Hello Ryan,


The syntax of this path is the same as you would use
in the TeamCity UI.
Read more about it here:
http://www.jetbrains.net/confluence/display/TCD3/Build
+Artifact


You can send this message as many times as you want.
Every time when this
message occurs TeamCity will start to publish
artifacts in the background
process. When build finishes artifact paths specified
via TeamCity UI will
be processed too.


TeamCity currently cannot start a dependent build if
artifacts on which this
build depends appear. However you can configure
TeamCity to trigger a build
if a build of some specific configuration finishes.


--
Pavel Sher
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.