2

I'm using Jenkins multibranch pipeline for CI process and for CD using Spinnaker.

I've gone through almost all documents, support channels etc. from spinnaker for "how to create spinnaker multibranch pipeline similarly as jenkins" but didn't find anywhere.

After integrating jenkins to spinnaker, in drop down list of jenkins jobs in spinnaker pipeline configuration, it shows all multibranch jobs separately. Hence for each branch I'd need to go to spinnaker and create pipeline manually.

To solve this, I'm thinking this solution: while running jenkins multibranch pipeline job > create spinnaker pipeline(if not exist) using spin cli with required parameters(branch, version, trigger using jenkins of this running branch job etc) > and trigger the same created spinnaker pipeline after jenkins job executed.

Please advise if there is any other better way to accomplish this.

Thanks.

Jaydeep Soni
  • 488
  • 1
  • 8
  • 19

1 Answers1

0

I am not super familiar with the multibranch plugin, but you can make this simpler by doing [ triggers ] -> [ pipeline stage calling the same pipeline ] rather than calling the entire pipeline via the spin-cli.

Alternatively, if the list of jobs generated is small or well known, you could just update the list of triggers for the same pipeline programmatically as part of your release process.

i.e, in your jenkins job

  • add this job to list of triggers
  • run rest of jenkins job
  • job finishes, spinnaker pipeline triggers
Tomas Lin
  • 3,532
  • 1
  • 22
  • 19