Is there a way to create a plan branch for all pull requests AND a custom set of branches in Bamboo - bamboo

When creating a plan branch, is there a way to configure Bamboo to make new branch when a pull request is created and in addition, for a set of branches that match a custom regex?
So it would be a combination of 2nd and 4th option

Related

How to keep the branches of a plan in bamboo specs?

I use bamboo specs to backup my plans in bamboo. However, if I remove one plan and restore it back, all the branches created for this plan are missing.
I tried to use this API endpoint Enable specs for branches but it does not seem to do any effect.
Is there any way to get the configurations and variables related to the branches of a plan in specs?
So then, if we restore back a plan that has been removed, there's no need to create branches manually and set up all needed variables specific of each branch.

Get the name of the source branch after an MR is merged in GitlabCI

I have a Pipeline job that needs to run only after an MR has been merged to a certain branch (let’s assume it’s master).
This job is supposed to make an API call to send the name of the merged source branch.
The problem I’m encountering is that CI_MERGE_REQUEST_SOURCE_BRANCH_NAME will not be available on the Pipeline that runs right after the merge (since it’s not a merge request pipeline).
Is there a way (env var) to tell what was the branch that was just merged into master?
Many thanks in advance y’all!
Better you work with hashes not with the names.
Anyway I see two options:
In the pipeline for the merge request save the hash/name in an artifact. The subsequent pipeline can access this artifact an read the hash/name.
Run a independent pipeline and read the hash/name of the previous pipeline. To do this more secure you can add tags and read the previous pipeline only if it has the correct tag.

Is there a way to create a shortcut in IntelliJ for multiple consecutive actions?

I'm wondering if there is a way to create a single shortcut in IntelliJ that does multiple consecutive actions.
For example, the following actions are needed to deploy a service:
check out the master branch
pull changes
check out the production branch
pull changes
merge the master branch into the production branch
push changes
Each of these actions can be done with a shortcut (and a bit of typing/selection in the case of the checking out), but I would like to do all of these in this order with a single shortcut.

Bamboo Branch Plans - Configure different jobs/ tasks for each branch plan

I'm having different project structure in each branch, is it possible configure different jobs/ tasks for each branch in bamboo? If not please suggest me any alternatives.
It's not possible to configure different tasks per branch in Bamboo. I can suggest 2 alternative ways:
You can use branch "Variables", use the Script task and have different manipulations based on the branch variable.
And if your project structure is really different per branch, I would suggest you to create a new plan for it.

Bamboo: Using a newly created Tag/Branch in checkout tasks at later stages in the plan

I am trying to create a build plan which has a VCS Tagging(or VCS Branching) task in its first stage, and then at later stages uses the newly created tag(or branch) to checkout code from it(repository is SVN).
I use a plan variable for the tag/branch name - ${bamboo.repoBranch} - and this variable is also used in the repository URL. I understand that this URL would not be valid until the tagging/branching task is executed, but tasks that try to checkout from that URL are at later stages.
From what I understand, there is something like a code change detection phase, during which Bamboo checks all defined repositories for changes(no matter the order they are referenced in the plan or even if they are not used in the plan at all). I think this is the reason my approach doesn't work, is that correct?
Here is the exception I get:
com.atlassian.bamboo.repository.InvalidRepositoryException: svn:
at
com.atlassian.bamboo.repository.svn.SvnRepository.detectCommitsForUrl(SvnRepository.java:527)
at
com.atlassian.bamboo.repository.svn.SvnRepository.collectChangesSinceLastBuild(SvnRepository.java:278)
Another alternative to what I am trying to achieve is to have a plan that creates a tag/branch and a child plan of that plan which uses the newly created tag/branch. The problem with this is that plan variables cannot be passed to child plans - I want to use Run Customized to override the value for ${bamboo.repoBranch} and the overridden value to be passed to the child plan. From what I've read the workaround for this is to use a script task which using the Bamboo REST API queues the next plan for execution, but this seems a not very elegant solution.
Any other approaches for what I am trying to achieve will be helpful.
Thanks