Referencing parent project name

I have a teamcity parameter defined in my TeamCity root project.

ProjectDir = %system.teamcity.projectName%

This almost correct, but in a few "leaf" projects, I want it to be set to the parent project name, not the current project name. Is there a way to do this (without hardcoding the project name string)?

Example. I have a root project P1. P1 contains P2, P2 contains P3, P3 contains P4.

I want the parameter ProjectDir to have the following values in the following projects

In P1, to have value "P1"

In P2, to have value "P2"

In P3 to have value "P3"

In P4, to also have value "P3" (not "P4")

 

Can I reference the parent project to get its name? Or could I "override" the ProjectDir parameter in P4 to refer to its value in P3?

 

0
1 comment

You could simply remove the assignment from p4. It will inherit the parameter from p3, with the value of p3.

0

Please sign in to leave a comment.