Artifact dependencies

Hello,


I am running TeamCity Enterprise Version 4.5.4 (build 9071).


I have question regarding artifact dependencies. Is there a way where I can also get the build number from the build configuration where I am pulling the dependent artifacts from?


Is yes, can anyone please post an answer?


Thanks,


Rahul

0
8 comments
Avatar
Permanently deleted user

Hello Kirill,


Thanks for pointing to that document, however, I am still not getting that right.


----------------

Let me explain my current scenario.


I have a build configuration B1 which generates Artifacts A1, A2, A3. I have another build configuration B2 which depends on B1 for these artifacts. I want to have B2 the same build number as B1 for a respective build in B1.


B1:


Set system.teamcity.debug.dump.parameters = true; so that I can get all "Available for Reference Property set". One of the property I need is listed in the logs of build B1.


[Available reference-only server properties] system.build.number = 43




B2:


B2 is set to trigger on each completed build of B1. In B2, I am setting the build.number.format as, %dep.bt2367.system.build.number%, where bt2367 is the build id for B1.

--------------



With the above setup I am still not getting the build.number in B2 similar to that of B1.


Can you please advise if I am missing a step or something here?


Thanks,


Rahul

0

Hello Rahul,

   You need to have a snapshot dependency between B1 and B2. Do you have it? Otherwise you cannot get access to build number of the B1 configuration in B2.

   Regards,
   KIR

0
Avatar
Permanently deleted user

Hello Kirill,


Thanks, that works for me. I was missing the SNAPSHOT dependencies part.


Rahul

0
Avatar
Permanently deleted user

Hello Kirill,


Sorry to ask this question after longtime.


The system variables (such as %dep.bt2367.system.build.number%) works well for Snapshot Dependency but not for Artifact Dependency in TC 4.5.4. However, in TC 5.x documentation it is mentioned that this will work for Artifact Dependency too.


http://confluence.jetbrains.net/display/TCD5/Predefined+Properties#PredefinedProperties-ReferenceonlyServerProperties


Can you please verify if the information in TC 5.x documentation is correct?


Rahul

0
Avatar
Permanently deleted user

Hello Rahul,

Documentation is correct, now you could use dependencies properties for artifacts dependency too.

Kind regards,
Marina

0

Hi Kirill,

Step1: I have created a project in teamcity TeamCity Enterprise 2017.1.2 using for .net code.

For regular projects we have configured build step runer type as Msbuild and given build file path is .sln or .csproj. and used commands to deploy the code to QA environment. see below image. Application is successfully generated Artifacts & deployed code to QA Environment.

 

Step2: I have created a second project which obtains the artifacts (Above) from the original project and needs to deploy them to IIS on my target server ( staging or production environment) to upgrade the instance.

I'm struggling to understand artifacts dependency.

Step1: For this I have created new project with Artifact Dependencies below. Artifacts are downloaded from previous build to checkout directory (destination path).

                  

Step3: Where i have specify this destination directory to tell Teamcity that to pick this package and upgrade the staging environment? I need to specify in Build step OR in Parameters section? How I need to configure the build step Runner Type (MSBuild) or any?

Step4: For Artifacts dependency how I have to specify the build step to deploy the package (using available Artifacts of previous build)  to UAT environment or Production environment?

 

Please help me..

0

Hello Pnarendra, 

   I was on vacation and could not answer. Is the problem still actual?

   Regards,

0

Please sign in to leave a comment.