How to trigger azure pipeline in one topic branch during push for another topic branch - azure-devops

My azure devops pipileine's yaml file is not in master branch of bitbucket. Its in another branch inside master branch (master/pipeline-branch). I am trying to trigger that build when there is a push to another topic branch which is also not the master branch. (master/topic/secondary).
In my yaml file I have written the trigger like this.
trigger:
- topic/secondary
But no build is triggered when I push a file to secondary branch.

you need to cherry pick\merge commits with this file to the secondary branch or just commit the yaml file to the secondary branch. when a commit is made a decision to start the build or not is being made by evaluating the yaml file inside the branch a commit was made to. if the file doesnt exist in that branch - there is nothing to trigger

Related

Trigger specific branch workflow everytime when PR is created

I'm new to Github action and want to trigger the master branch .github/workflows present in the base branch repo whenever the new PR is created.
Current Code:
on: pull_request: branches: - "**"
Its trigger the workflow code present in head branch and not able to fetch the secret key present in the base branch repo when PR is create from another repo.
I want to trigger the specific branch workflow for every PR created to that repo.
The pull-request trigger for an action runs in the context of the merge commit between the head branch and the base branch. The pull_request_target trigger runs in the context of the base branch of the pull request. That seems like what you want for this action.
However, I should note that a branch on the git repo is probably not the place to store a "Secret key", take a look at Github's secrets feature for securely storing keys for use in actions workflows.

How to trigger a job in Concourse pipeline when feature branch is deleted?

I am looking for an option to trigger a job automatically whenever a feature branch is deleted in git.
For e.g I have two feature branches and if one is deleted, should trigger a Job and Job should know which feature branch is deleted.
Reference - https://www.concoursetutorial.com/basics/triggers.html
As per the above URL, job gets triggered whenever there is a new commit to the branch (master/feature).
So when we merge our feature branch using 'Squash and Merge' and delete the feature branch, it will be a new commit to Dev/Master branch and job will get triggered, but how we would know which feature branch is deleted?
Thanks in Advance!

Get azure-pipelines.yml file to specific branch

I want my Pipeline to work on a specific branch, different than master. After building Pipeline in DevOps the azure-pipelines.yml file goes to the master branch. Do I have to add this file manually to a different branch? Or it can be done somewhere during a configuration?
By default its being added to master branch, you'd need to cherry pick it into your desired branch, or just create it\edit it there in the first place. its just a file.

Got error trigger Jenkins builds by pushing to Github

I config Jenkins deploy PHP app by trigger the script deployment whenever developers pushed their code to Github with domain .mydomain.com. If developer create new branch and push some changes to that branch, it works perfectly fine, the strange thing is when developer create new branch and push to server (don't change anything just
create new branch and push) it doesn't trigger the script deployment.
Could you please help?
In Git configuration there is a field Branch Specifier (blank for default): if you put there ** it will build all branches from all remotes.
But if you are creating a new branch and push to server it won't trigger the job. As Github plugin in Jenkins configuration is monitoring the changes in the repo and creating a branch is not a change. So the job won't trigger for that branch until you do a commit in that branch. And I feel this is the correct behavior.
For example when you do a commit xxxx on branch master, your job
gets triggered with commit id xxxx. Now you create a branch say
branch1 from master and you push to server. As you can see there is
not difference between commit xxxx and branch1 so there is no need
to build branch1 in Jenkins.

How to config Jenkins to build any branch whenever it committed to GitHub

I'd like to config jenkins that builds any branch whenever it committed to GitHub.
I did as below:
At Source Code Management, I chose Git and Branch Specifier was **
At Build Triggers, I chose Build when a change is pushed to GitHub
I tried to commit to branch (ex: fixBugAAA), but jenkins built all branches.
What did I do wrong? I just need to build only one branch I committed (ex: in this case fixBugAAA). How to do that?
Thanks.