How to run another job from hudson as a pre-build step?

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

+56
hudson jenkins
Mar 30 '11 at 13:39
source share
4 answers

There is a Parameterized trigger plugin that allows you to "create trigger / calls in other projects" in the "Add Build Step" menu.

+70
Apr 18 2018-11-11T00:
source share

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

Basically you create 3 tasks:

A = your prebuild ste

B = your main task

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.

In fact, we have a set of 5 pre-build tasks before our main program starts.

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

If you do not want to try this:

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

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

This will trigger the task. The bad part about this is that he will not wait for the task to complete.

+10
Mar 30 2018-11-11T00:
source share

Actually, I know how to answer your question: This is the plugin you need:

Prebuild

He is not widely known, but does what you want.

It basically starts Build in front of your chosen one. For example: you want A to run before B. You press "start B", it will execute A before starting B.

Pro: -> Very versatile -> Ease of use

Cons: -> There is no support / option in the event of a pre-assembly failure (for example, do not build if the pre-assembly failed) -> Development seems to be inactive at all.

Here you can see how it looks enter image description here

+1
Jan 26 2018-12-12T00:
source share

I have the same problem and I found a way to do:

I am using jenkins version jenkins-1.452-1.1.

Say that I have work A and B, and Job A depends on job B. When creating job B, I want A to start automatically and B to be locked until the build completes successfully.

When you define the assembly configuration in the assembly section, I add a trigger assembly for other projects. then fill out the form.

0
Mar 26 2018-12-12T00:
source share



All Articles