How to access parameters in a Parameterized Build?

前端 未结 10 2076
你的背包
你的背包 2020-11-29 04:44

How do you access parameters set in the \"This build is parameterized\" section of a \"Workflow\" Jenkins job?

TEST CASE

10条回答
  •  [愿得一人]
    2020-11-29 05:46

    The following snippet gives you access to all Job params

        def myparams = currentBuild.rawBuild.getAction(ParametersAction)
        for( p in myparams ) {
            pMap[p.name.toString()] = p.value.toString()
        }
    

提交回复
热议问题