1

Have task - deploy application.war in to Tomcat's directory after build.

application.war collected from buildAgent box to server box. But - it always have different absolute path - because uses buildId in pathname:

 /home/teamcity/.BuildServer/system/artifacts/ProjectName/buildName/BUILD_ID/application.war

Using any path for target directories like ...\application.war => /home/teamcity/directory - does'n put file in to /home/teamcity/directory in TeamCity home - it always uses /home/teamcity/.BuildServer/system/artifacts/buildName/BUILD_ID/home/teamcity/directory as "HOME".

So - I can't us deploy.script - because it don't know current BUILD_ID.

What is correct way to solve it?

UPD changing variable TEAMCITY_DATA_PATH affect whole server inculding configs etc. How can be changed only "artifacts storage"?

setevoy
  • 4,374
  • 11
  • 50
  • 87
  • possible duplicate of [Is it possible to change TeamCity's artifacts path](http://stackoverflow.com/questions/2092604/is-it-possible-to-change-teamcitys-artifacts-path) – setevoy Jan 21 '14 at 10:36

1 Answers1

0

I'm pretty sure that you're building with maven or gradle and my proffered way would be to use build script to deploy artefact correctly.

However to answer your question. Have you looked to artefacts paths of TeamCity:

/repository/download/BUILD_TYPE_ID/.lastFinished/ARTIFACT_PATH
/repository/download/BUILD_TYPE_ID/.lastSuccessful/ARTIFACT_PATH
/repository/download/BUILD_TYPE_ID/.lastPinned/ARTIFACT_PATH

You can find more documentation here - http://confluence.jetbrains.com/display/TCD7/Patterns+For+Accessing+Build+Artifacts

Eugen Martynov
  • 19,888
  • 10
  • 61
  • 114