i'm trying to figure out how can i add an administrative build to Jenkins that will manage a few builds, and how can i path the parameters from the administrative build to the child builds.
相关问题
- JQ: Select when attribute value exists in a bash a
- Jenkins - cmd is not recognized
- bash print whole line after splitting line with if
- “command not found” errors in expect script execut
- grep using grep results
相关文章
- dotnet restore还原nuget包时无法加载 https://api.nuget.org/
- jenkins在window集群环境中如何部署自动化发布?
- jenkins + Publish over FTP 自动部署前端React项目
- jenkins自定打包部署React前端项目遇到的问题。
- Check if directory exists on remote machine with s
- Handling ffmpeg library interface change when upgr
- Best way to manage docker containers with supervis
- Access BitBucket payload data in Jenkins pipeline
Parameterized Trigger Plugin is what you're looking for.
Once you've installed the plugin, refer 2nd snapshot below. Go to
Configure
page of your project. Search forBuild > Add build step > From drop-down menu, select Trigger/call builds on other projects
. After that, click onAdd Parameters > From drop-down menu, select Current build parameters
Above snapshot is of parent job A where i am defining a string parameter, which will be utilized in its child job B.
Above snapshot is again of parent job A where i am specifying the downstream (child) job B and also enabling
Current build parameters
, which will ensure that the parameters defined in parent job A are visible to child jobs. Once we are done with these settings, we should be able to see the upstream job link in the child job B as shown below. This will confirm that things are fine till now. :)Now the only task left is using/calling the variable (defined in parent job A) in child job B. This is shown in the below snapshot:
I tested it on Windows so i used
%string%
.If you're on UNIX/Linux machine, select 'Execute shell' and use
${string}