Parameter not work when run buildchain

Hi

I've create a build chain like this:

1- Build > 2- Test > 3- Deploy

 

Q1 - what is the different if I run step 1 or step 3? (when I run step 1 just this step will be run and next steps won't run)

when I run step 3 all previous steps run ? which on is correct or standard in teamcity?

 

Q2- I've set some Parameters such as %BranchNo% in step 1 and run step 3 (as I want next steps running) but when I enter this Parameter build log show me this:

rm -rf %BranchNo%   > rm -rf  (here is empty)

while it should be like this

rm -rf %BranchNo%   > rm -rf 18

what happen here in teamcity?

 
 
 
G
M
T
 
Detect language Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bengali Bosnian Bulgarian Catalan Cebuano Chichewa Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Esperanto Estonian Filipino Finnish French Galician Georgian German Greek Gujarati Haitian Creole Hausa Hebrew Hindi Hmong Hungarian Icelandic Igbo Indonesian Irish Italian Japanese Javanese Kannada Kazakh Khmer Korean Lao Latin Latvian Lithuanian Macedonian Malagasy Malay Malayalam Maltese Maori Marathi Mongolian Myanmar (Burmese) Nepali Norwegian Persian Polish Portuguese Punjabi Romanian Russian Serbian Sesotho Sinhala Slovak Slovenian Somali Spanish Sundanese Swahili Swedish Tajik Tamil Telugu Thai Turkish Ukrainian Urdu Uzbek Vietnamese Welsh Yiddish Yoruba Zulu   Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bengali Bosnian Bulgarian Catalan Cebuano Chichewa Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Esperanto Estonian Filipino Finnish French Galician Georgian German Greek Gujarati Haitian Creole Hausa Hebrew Hindi Hmong Hungarian Icelandic Igbo Indonesian Irish Italian Japanese Javanese Kannada Kazakh Khmer Korean Lao Latin Latvian Lithuanian Macedonian Malagasy Malay Malayalam Maltese Maori Marathi Mongolian Myanmar (Burmese) Nepali Norwegian Persian Polish Portuguese Punjabi Romanian Russian Serbian Sesotho Sinhala Slovak Slovenian Somali Spanish Sundanese Swahili Swedish Tajik Tamil Telugu Thai Turkish Ukrainian Urdu Uzbek Vietnamese Welsh Yiddish Yoruba Zulu          
 
 
 
Text-to-speech function is limited to 200 characters
 
  Options : History : Feedback : Donate Close
0
2 comments

Regarding Q1: If you run 3 with dependencies set up, they will automatically bring up an instance of 2 and 1. As it has a dependency, TeamCity assumes that 1 and 2 are required for 3 to work. If you run 1, it will not run any of the builds that depend on 1, because they aren't depended by 1. There could be an arbitrary large number of builds depending on 1 which are totally unrelated and undesired. This not only applies for manual runs, but also for triggers. A trigger at the end of a chain will automatically set its dependencies to run, while a trigger at the start of a chain will not.

If you wish to run 1 and it to trigger its dependencies, but don't want to trigger 3, you can use finish build triggers.

Regarding Q2: You would need to show us how you have set up the parameters, but keep something in mind: Parameters are scoped, just like variables are in most languages. If you set a parameter on a project level, the full project will have access to it. If you set it on a build configuration, only the build configuration will have access to it. If you set multiple instances of the same parameter in different build configurations, each build configuration will have its own instance of it, unaffected by the others. If you want to share parameters through different builds, use dependency parameters: https://confluence.jetbrains.com/display/TCD10/Predefined+Build+Parameters#PredefinedBuildParameters-DependenciesProperties

If something is not clear enough, please don't hesitate to follow up.

1

Thank you Denis for your answer,

I’ve set parameters for build configuration (step1 and step3) and also for project parameters (separately)  

after that run build step3 but when I enter parameter in build log show me it’s empty!

do you have any idea?

Regards,

0

Please sign in to leave a comment.