Does Jenkins Create Upstream/Downstream automatically?

我怕爱的太早我们不能终老 提交于 2021-02-18 18:40:52

问题


I am using jenkins for continuous integration. I have created seperate views like view A for server A , view B for server B etc.

Each view builds my project based on the server's environment properties.

But i could see that irrelevant upstream and downstream are getting created even when it is not created explicitly. Is there any solution for this? :(


回答1:


In Jenkins,When you have projects that depend on each other, Jenkins can track which build of the upstream project is used by which build of the downstream project, by using the records created by the fingerprint support.

For this feature to work, the following conditions need to be met:

The upstream project records the fingerprints of its build artifacts The downstream project records the fingerprints of the upstream files it uses This allows Jenkins to correlate two projects.

Because of this, the upstream and downstream might be created automatically. So, in the project configuration, uncheck the option

Build Triggers Build whenever a SNAPSHOT dependency is built

This will remove all the upstream downstream that are existing even after deleting the streaming dependency explicitly.




回答2:


Upstream-Downstream relationship is created in two ways:

  1. You trigger a build using build triggers in Post Build actions.
  2. Fingerprinting. In this case if a file is fingerprinted in upstream jobs and is also used and fingerprinted in any other job, both the jobs develop an upstream- downstream relationship.

For the first case you can remove the build trigger to remove Upstream-Downstream relationship.

In the second case, you cannot restrict Jenkins from creating that relationship but can restrict automatic trigger of the downstream job by checking "Disable triggering of downstream projects" option under the Build configuration. This will trigger only those downstream jobs that are explicitly configured to get triggered in post build actions.

Hope this helps.



来源:https://stackoverflow.com/questions/17803165/does-jenkins-create-upstream-downstream-automatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!