0
votes

I am attempting to build a Windows installer through Jenkins.

I have a number of jenkins projects that build individual modules and then save these artifacts in s3 via the s3 artifact plugin.

I'd like to run these in parallel and copy the artifacts to a final "build-installer" job that takes all these and builds an installer image. I figured out how to run jobs in parallel with jenkins workflow but I don't know where to look to figure out how to extract job result details, ensure they're all the same changeset and pass it to the 'build-installer' job.

So far I have workflow script like this:

def packageBuilds = [:]
// these save artifacts to s3:
packageBuilds['moduleA'] = { a_job = build 'a_job' }
packageBuilds['moduleB'] = { b_job = build 'b_job' }
parallel packageBuilds

// pass artifacts from another jobs to below??
build job:'build-installer', parameters:????

Is this the right way? Or should I just have a mega build job that builds the modules and installer in one job?

1

1 Answers

1
votes

A single job that does all the steps would be easier to manage.

I know file parameters are yet not supported for sending files to a Workflow job: JENKINS-27413. I have not tried sending files from a Workflow job using file parameters. Probably cannot work without some special support. (Not sure if you can even send file parameters between freestyle builds, for that matter.)