Same workspace for multiple jobs

前端 未结 4 2099
星月不相逢
星月不相逢 2020-12-07 15:42

I have a job called \"development\" and another project called \"code analysis\". At the moment we have two different jobs and different workspaces, but same code; is there

4条回答
  •  抹茶落季
    2020-12-07 16:01

    I tried the inheritance plugin and whoa! that thing is a sledgehammer when all I have is a tiny nail.

    I ended up adding a Post-build Action of "Trigger parameterized build on other projects" with "Build on the same node" and a "Predefined parameter". The downstream job needs to have a parameter of the same name defined (WORKSPACE_PARENT) but you can leave it blank. You then define the downstream job with a custom workspace (under General > Advanced)

    I chose a post-build action because the actual success of the build job is independent on the results of the downstream build (for now). If you want to bump the results of the downstream job up to the parent job, you need to add it as a build task, not a post-build action.

    It works great for what I need.

    Parent's post-build task:

    Child's custom workspace:

提交回复
热议问题