rhdev opened 2 years ago
|
|||||||
This is by design. A job can only be triggered by commits in same repository. The This setting is useful for instance when some trigger should be turned off in forked projects. I will add more explanation to this setting to avoid confusion. For your case, you may consider to trigger ProjectTwo from ProjectOne's job command via OneDev's restful api: https://code.onedev.io/help/api/io.onedev.server.rest.JobRunResource/runBuild |
|||||||
Just curious, why ProjectTwo needs to monitor branch updates of ProjectOne? |
|||||||
Hmm, thanks for that. I was trying to do it this way because it wouldn't work monitoring its own repository for new branches. I had the build yml in main branch with two build jobs, the first would pull from the remote repo and create a branch, the second should trigger on a new branch but it wouldn't work. I'll take another look. |
|||||||
Robin Shen changed fields 2 years ago
|
|||||||
You will need to put the job "when new branch" in project https://gitlab.com/Remmina/Remmina.git. The branch trigger works as below: Whenever a commit is pushed to a branch at OneDev side, OneDev will examine pushed commit to see if it contains onedev build spec, if yes, it continues to examine each job to see if the trigger condition is matched, if matched, the job will be fired. |
|||||||
Robin Shen changed state to 'Closed' 2 years ago
|
Type |
Question
|
Priority |
Normal
|
Assignee |
I have a Build on ProjectOne which clones another repo from GitLab into a new Branch based on the latest tag of the remote GitLab repo. I have a Build on ProjectTwo which has triggers based on branches being created on ProjectOne, but it doesn't trigger.
ProjectOne
ProjectTwo