How do I trigger another job from hudson as a pre-build step?

后端 未结 4 1615
迷失自我
迷失自我 2020-12-01 05:46

How do I trigger another job from hudson as a pre-build step?

4条回答
  •  情书的邮戳
    2020-12-01 06:41

    You can use the plugin at http://wiki.jenkins-ci.org/display/JENKINS/Join+Plugin

    Basically you create 3 jobs:

    A = your prebuild ste

    B = your main job

    C = your trigger.

    You 'build' C. It calls A, and once A is successful, it calls B. The plugin page gives you more information. The good thing about this plugin is that you can have any number of pre-build jobs.

    We actually have a set of 5 pre-build jobs before our main is run.

    ================================================

    If you don't want to try that:

    If you are using Linux, you can do the following from within your "shell" script:

    wget http://yourserver/hudson/job/MyJob/build?delay=0sec
    

    This will trigger the job. The bad part about this is that it will not wait for the job to finish.

提交回复
热议问题