Getting job id as an input

Hello,

I would like to get the job id (such as #2594) of the current teamcity job as an input to my script. I tried:

if [ $? != 0 ]; then
    python ./src/scripts/python/utils/store_test_artifacts.py --buildId %system.build.number%
fi

 

But this leads to the error: 

There are no compatible agents which can run this build.
and
Implicit requirements:

system.teamcity.build.id defined in Build step: Setup

How can I pass the jobID shown in teamcity to my script?

 

Kind regards

 

Matthias

0
1 comment

Hello,

Can you please try to use %teamcity.build.id% instead of %system.build.number% ?

Thank you,

Guilherme

0

Please sign in to leave a comment.