Build Parameter: Pull Request: Multiple Projects (OD-2202)
empinator opened 1 year ago

Hi Robin,

since we have an project structure which spans over mutliple code projects we would like to ensure, that various pull requests which are related to each other can be verified within on common build.

Therefore we are trying to parameterize the build with pull requests, but can only reference PR from its own project.

It would be nice to have a project-specifier which allows to reference other projects. Similar to custom fields where you can limit the visibility

Alternatively we are looking into using a custom groovy script to get a list of PR from other projects, however we are a bit struggling. Maybe you can give us an example to get started?

  • Robin Shen commented 1 year ago

    since we have an project structure which spans over mutliple code projects we would like to ensure, that various pull requests which are related to each other can be verified within on common build.

    Do you mean to set up a common build so that it can clone source from tip of each pull request, and run tests over them? If so, this is not possible and each pull request needs to be verified independently.

  • empinator commented 1 year ago

    it's not so important what an actual onedev build job can do, but rather to have the parameter, since we are outsourcing our build jobs due to company policy. our build would ensure to pull the right sources from both requests then

  • Robin Shen commented 1 year ago

    OK. I still confused what you want to do with build paramater:

    Therefore we are trying to parameterize the build with pull requests, but can only reference PR from its own project.

    Can you please elaborate with an example?

  • empinator commented 1 year ago

    let's say we have two projects

    in a remote build pipeline we checkout both projects to do a common build, since they belong together

    now, if users commits code to both projects we want them to create two pull requests, one for each project.

    to have a build evaluating the combination of both PRs we want to give these two PRs as parameter to the build.

    commit and pull request:

    • projectA <- commit <- pull-request (PA-12)
    • projectB <- commit <- pull-request (PB-21)

    build:

    • projectA <- build <- param: PA-12 and PB-21

    PB-21 can't be determined, since only PRs from projectA are available for the "pull request" parameter type.

  • Robin Shen commented 1 year ago

    It is possible to select pull requests of other projects to fullfill pull request param: just type project path prefix, for instance path/to/project#, or you may type projectkey- if project key is defined for that project.

  • Robin Shen changed state to 'Closed' 1 year ago
    Previous Value Current Value
    Open
    Closed
issue 1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-2202
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover