简体   繁体   中英

Stream dependencies in Jenkins

I am having a problem with having Jenkins selecting the correct upstream and downstream dependencies. We're using Git, Maven, and only SNAPSHOT versioning.

To give an example. I have a project some-project

  • In the master branch I have version 1.0-SNAPSHOT
  • In the dev branch I have version 1.1-SNAPSHOT

I have one Jenkins job named some-project-master building the master branch, and one named some-project-dev build the dev branch. In another project, my-api , I have a dependency to some-project-1.1-SNAPSHOT, so the my-api job in Jenkins have some-project-dev as upstream dependency.

When I merge dev -> master (and delete the dev branch) then some-project-master starts building some-project-1.1-SNAPSHOT, and I now want my-api to have some-project-master as upstream project rather that some-project-dev. However, I cannot find a way to make this happen without deleting the some-project-dev job - which at this time is failing because I have deleted the branch. (And as you understand - I really don't want to delete the dev job because I have lots of these jobs)

Any way to have Jenkins somehow rebuild its dependencies?

I solved this by disabling the job some-project-dev. Then my-api job used some-project-master as upstream dependency instead. Not my preferred solution but best I found.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM