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

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!

Related

Azure master branch doesnt show the merged commits

We are using Azure DevOps, recently came across the issue when some of the commits that was stated to be completed and merged to the master branch dont show up in Repos history.
Azure master branch doesnt show the merged commits
It depends on the merge method you choose when you PR.
Azure Repos has several merge strategies, and by default, all of them are allowed. You can maintain a consistent branch history by enforcing a merge strategy for PR completion.
So, if you select the Squash merge, which is a merge option that allows you to condense the Git history of topic branches when you complete a pull request. Instead of each commit on the topic branch being added to the history of the default branch, a squash merge adds all the file changes to a single new commit on the default branch.
In this case, the commits that was stated to be completed and merged to the master branch dont show up in Repos history.
You could check the document Merge strategies and squash merge for some more details.

Github-pull request conflicts

I Created a pr and it was approved. As Build got failed, I was unable to merge with master branch. So, I made some changes and committed code to feature branch. Still I am unable to merge with master branch because of the issue:"" There is 1 issue preventing you from merging this pull request.
You still need a minimum of one successful build before this pull request can be merged.""
To merge my changes with master, can I continue with my existing pr or do I have to create a pr?

Azure DevOps Release Pipeline - Allowing branch selection at release time

I have a Release pipeline (Classic version) with artifact set to a Azure Git repo. The default branch is set to master branch. Every time someone creates a new release, latest version of master branch is copied to the Dev Ops agent and release tasks will run.
Is it possible to allow specification of branch at release creation time?
If I don't misunderstand, you would like to trigger release pipeline with specific branches.
You could try to add Branch filters.
A release will be triggered only if the Git push contains a commit on
the specified branch. For example, selecting "master" will trigger a
release for a Git push which contains one or more commits to the
master branch. To trigger a release for any commit to branches under
features/, enter "features/". To trigger a release for commits to all
branches, enter "". Note that all specified filters will be OR'ed.
For example, an artifact matching at least one filter condition would
be sufficient to trigger a release.
If you mean triggerring stages with specific branches, Artifact filters can do.
For more information, please refer to this document.

How to add a commit done on a restored branch to an old PR?

In the PR , after I merged a branch and deleted it, I restored the branch again on the PR.
Locally, then I made changes to the branch and pushed it to the remote branch. The commit is available on the remote branch but it does not come up in the existing merged PR.
After I compare and Pull Request, it is creating a new PR.
Is it possible to add the commit to the old PR itself?
No, you can't re-open the pull request if it was merged.

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

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