fetching parameters from a jenkins job in java code

前端 未结 3 887
广开言路
广开言路 2021-01-22 05:44

I have a parameterised jenkins job that is accessing my plugin. Inside plugin\'s code in java, i require these parameters using which i have to trigger another job in jenkins. I

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-22 05:52

    Thanks for the suggestions, but it worked when i did the following: I hit the

    JENKINS_HOST_URL/job/JENKINS_SEED_JOB_NAME/api/json?pretty=true
    

    and found the current build number, thereafter, hitting jenkins again with this number(JENKINS_HOST_URL/job/JENKINS_SEED_JOB_NAME/currBuildNum/api/json?pretty=true),

    I was able to fetch all the parameters passed in there in this build.

提交回复
热议问题