#340  How to Choice Build Branch when Job is Executed Automatically by Trigger
Closed
Khose opened 3 years ago

Like the title.

I have a job and it's trigger is like below:

When merge pull requests targeting branches 'develop develop-*'

I want the job automatically run when the pull requests has been merged into branch "develop". But all my jobs run in master branch, so How to choice build branch when job is executed automatically by trigger?

Robin Shen commented 3 years ago

You may add another "branch update" trigger when "develop" branch is updated.

Robin Shen changed state to 'Closed' 3 years ago
Previous Value Current Value
Open
Closed
Khose commented 3 years ago

Hi

You mean that set the two triggers ? Or only set the "branch update" trigger ?

Robin Shen commented 3 years ago

Yes, use two triggers: one to trigger pull request, and another one to trigger updated branch

Khose commented 3 years ago

Ok, thank you.

so the job will be run in develop branch after set these 2 triggers? And the relationship among triggers is && or || ?

Robin Shen commented 3 years ago

Exactly. As long as one trigger is satisfied, the job will run.

issue 1 of 1
Type
Question
Priority
Normal
Assignee
Issue Votes (0)
Watchers (3)
Reference
onedev/server#340
Please wait...
Page is in error, reload to recover