How to extract triggered job name in Jenkins using python -




i need extract name of running jenkins build using python script. 1 tell me how can extract jenkins triggered job's name @ runtime using python ?

i've never cared particular bit of information before, jenkins sets environment variables during build. appears need like:

import os job_name = os.getenv("job_name") 

depending on build outside of jenkins environment, might useful specify default in case variable not set:

job_name = os.getenv("job_name", "(local build)") 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -