You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Hoffer <dh...@gmail.com> on 2021/10/21 13:29:45 UTC

Best Maven practices for releasing components/applications when the SCM requires PRs?

Our SCM is BitBucket/GIT and normally it does not allow Pushes to Master,
have to Push to a branch and then do a PR to merge to Master.  However this
doesn't work with the maven release plugin so we have to turn off the PR
requirement when performing releases.

What are the best practices for managing this?  We would like to avoid
having to manually turn something off and then back on again.

Is there a way the plugin can manage this?  Is there a different release
plugin that can handle the PR process?

Does anyone know if the BitBucket PR process can be bypassed for certain
users using the maven release plugin?  That might be the simplest solution
if that is possible.

-Dave

Re: Best Maven practices for releasing components/applications when the SCM requires PRs?

Posted by je...@gmail.com.
trunk based vs gitflow is a well covered subject on the internet, both have
tradeoffs that you need to think about and choose what's best for you.

For us, it was the ability to quickly make a hotfix on the master branch
for production in case a big refactor/change was merged in the develop
branch in the meantime and required more testing (this happened often and
we were happy to have this option). It made the whole maven versioning
thing also easier since we only publish the artifacts after the production
deployment and incrementing only in the master branch (master could be seen
as a release candidate branch in the end, not all versions in master went
to production).

On Thu, Oct 21, 2021 at 10:48 AM David Hoffer <dh...@gmail.com> wrote:

> What is the benefit/reason to do the release on a separate branch?  Since I
> have learned we can bypass the BB PR process for approved users it seems
> our problems will be solved.  We aren't currently using gitflow or any
> advanced GIT process.  We just use branches for PRs (they are removed after
> the merge) and for bug fix releases off from tags/master.
>
> -Dave
>
> On Thu, Oct 21, 2021 at 8:38 AM Jeremy Landis <je...@hotmail.com>
> wrote:
>
> > Try doing your release on a separate branch instead of using master or if
> > you have jenkins pipeline or other automated build system, let it do the
> > release with user account that does not have that requirement.  Bitbucket
> > allows a user whitelist.
> >
> > Sent from my Verizon, Samsung Galaxy smartphone
> > Get Outlook for Android<https://aka.ms/AAb9ysg>
> > ________________________________
> > From: David Hoffer <dh...@gmail.com>
> > Sent: Thursday, October 21, 2021 9:29:45 AM
> > To: Maven Users List <us...@maven.apache.org>
> > Subject: Best Maven practices for releasing components/applications when
> > the SCM requires PRs?
> >
> > Our SCM is BitBucket/GIT and normally it does not allow Pushes to Master,
> > have to Push to a branch and then do a PR to merge to Master.  However
> this
> > doesn't work with the maven release plugin so we have to turn off the PR
> > requirement when performing releases.
> >
> > What are the best practices for managing this?  We would like to avoid
> > having to manually turn something off and then back on again.
> >
> > Is there a way the plugin can manage this?  Is there a different release
> > plugin that can handle the PR process?
> >
> > Does anyone know if the BitBucket PR process can be bypassed for certain
> > users using the maven release plugin?  That might be the simplest
> solution
> > if that is possible.
> >
> > -Dave
> >
>

Re: Best Maven practices for releasing components/applications when the SCM requires PRs?

Posted by David Hoffer <dh...@gmail.com>.
What is the benefit/reason to do the release on a separate branch?  Since I
have learned we can bypass the BB PR process for approved users it seems
our problems will be solved.  We aren't currently using gitflow or any
advanced GIT process.  We just use branches for PRs (they are removed after
the merge) and for bug fix releases off from tags/master.

-Dave

On Thu, Oct 21, 2021 at 8:38 AM Jeremy Landis <je...@hotmail.com>
wrote:

> Try doing your release on a separate branch instead of using master or if
> you have jenkins pipeline or other automated build system, let it do the
> release with user account that does not have that requirement.  Bitbucket
> allows a user whitelist.
>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android<https://aka.ms/AAb9ysg>
> ________________________________
> From: David Hoffer <dh...@gmail.com>
> Sent: Thursday, October 21, 2021 9:29:45 AM
> To: Maven Users List <us...@maven.apache.org>
> Subject: Best Maven practices for releasing components/applications when
> the SCM requires PRs?
>
> Our SCM is BitBucket/GIT and normally it does not allow Pushes to Master,
> have to Push to a branch and then do a PR to merge to Master.  However this
> doesn't work with the maven release plugin so we have to turn off the PR
> requirement when performing releases.
>
> What are the best practices for managing this?  We would like to avoid
> having to manually turn something off and then back on again.
>
> Is there a way the plugin can manage this?  Is there a different release
> plugin that can handle the PR process?
>
> Does anyone know if the BitBucket PR process can be bypassed for certain
> users using the maven release plugin?  That might be the simplest solution
> if that is possible.
>
> -Dave
>

Re: Best Maven practices for releasing components/applications when the SCM requires PRs?

Posted by Jeremy Landis <je...@hotmail.com>.
Try doing your release on a separate branch instead of using master or if you have jenkins pipeline or other automated build system, let it do the release with user account that does not have that requirement.  Bitbucket allows a user whitelist.

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: David Hoffer <dh...@gmail.com>
Sent: Thursday, October 21, 2021 9:29:45 AM
To: Maven Users List <us...@maven.apache.org>
Subject: Best Maven practices for releasing components/applications when the SCM requires PRs?

Our SCM is BitBucket/GIT and normally it does not allow Pushes to Master,
have to Push to a branch and then do a PR to merge to Master.  However this
doesn't work with the maven release plugin so we have to turn off the PR
requirement when performing releases.

What are the best practices for managing this?  We would like to avoid
having to manually turn something off and then back on again.

Is there a way the plugin can manage this?  Is there a different release
plugin that can handle the PR process?

Does anyone know if the BitBucket PR process can be bypassed for certain
users using the maven release plugin?  That might be the simplest solution
if that is possible.

-Dave

Re: Best Maven practices for releasing components/applications when the SCM requires PRs?

Posted by je...@gmail.com.
We use gitflow so a develop branch with "1-SNAPSHOT" version and a master
branch with a fixed maven version in it. We have a script to handle the
merge from develop->master and bump the appropriate version based on the
previous one. It's all automated in a script that is run on jenkins to be
able to push directly to master without a PR.

On Thu, Oct 21, 2021 at 10:04 AM David Hoffer <dh...@gmail.com> wrote:

> That is great news.  We don't have a specific CI user yet but your approach
> sounds great and we will investigate this, it seems the best and simplest
> solution.
>
> Just curious do you do releases manually via command prompt or do you
> automate the process with your CI tool?  We use Jenkins but releases are
> manual so far for us.
>
> -Dave
>
> On Thu, Oct 21, 2021 at 7:44 AM <je...@gmail.com> wrote:
>
> > Hi Dave,
> >
> > Does this maven-release part of your workflow runs on CI? If yes, you can
> > manually allow specific users to push directly to master, that's what we
> do
> > on our end. We have a specific restricted CI user that we manually allow
> on
> > the branch permissions in bitbucket with write access and keep the PR
> > restriction for the rest of the users.
> >
> > On Thu, Oct 21, 2021 at 9:30 AM David Hoffer <dh...@gmail.com> wrote:
> >
> > > Our SCM is BitBucket/GIT and normally it does not allow Pushes to
> Master,
> > > have to Push to a branch and then do a PR to merge to Master.  However
> > this
> > > doesn't work with the maven release plugin so we have to turn off the
> PR
> > > requirement when performing releases.
> > >
> > > What are the best practices for managing this?  We would like to avoid
> > > having to manually turn something off and then back on again.
> > >
> > > Is there a way the plugin can manage this?  Is there a different
> release
> > > plugin that can handle the PR process?
> > >
> > > Does anyone know if the BitBucket PR process can be bypassed for
> certain
> > > users using the maven release plugin?  That might be the simplest
> > solution
> > > if that is possible.
> > >
> > > -Dave
> > >
> >
>

Re: Best Maven practices for releasing components/applications when the SCM requires PRs?

Posted by David Hoffer <dh...@gmail.com>.
That is great news.  We don't have a specific CI user yet but your approach
sounds great and we will investigate this, it seems the best and simplest
solution.

Just curious do you do releases manually via command prompt or do you
automate the process with your CI tool?  We use Jenkins but releases are
manual so far for us.

-Dave

On Thu, Oct 21, 2021 at 7:44 AM <je...@gmail.com> wrote:

> Hi Dave,
>
> Does this maven-release part of your workflow runs on CI? If yes, you can
> manually allow specific users to push directly to master, that's what we do
> on our end. We have a specific restricted CI user that we manually allow on
> the branch permissions in bitbucket with write access and keep the PR
> restriction for the rest of the users.
>
> On Thu, Oct 21, 2021 at 9:30 AM David Hoffer <dh...@gmail.com> wrote:
>
> > Our SCM is BitBucket/GIT and normally it does not allow Pushes to Master,
> > have to Push to a branch and then do a PR to merge to Master.  However
> this
> > doesn't work with the maven release plugin so we have to turn off the PR
> > requirement when performing releases.
> >
> > What are the best practices for managing this?  We would like to avoid
> > having to manually turn something off and then back on again.
> >
> > Is there a way the plugin can manage this?  Is there a different release
> > plugin that can handle the PR process?
> >
> > Does anyone know if the BitBucket PR process can be bypassed for certain
> > users using the maven release plugin?  That might be the simplest
> solution
> > if that is possible.
> >
> > -Dave
> >
>

Re: Best Maven practices for releasing components/applications when the SCM requires PRs?

Posted by je...@gmail.com.
Hi Dave,

Does this maven-release part of your workflow runs on CI? If yes, you can
manually allow specific users to push directly to master, that's what we do
on our end. We have a specific restricted CI user that we manually allow on
the branch permissions in bitbucket with write access and keep the PR
restriction for the rest of the users.

On Thu, Oct 21, 2021 at 9:30 AM David Hoffer <dh...@gmail.com> wrote:

> Our SCM is BitBucket/GIT and normally it does not allow Pushes to Master,
> have to Push to a branch and then do a PR to merge to Master.  However this
> doesn't work with the maven release plugin so we have to turn off the PR
> requirement when performing releases.
>
> What are the best practices for managing this?  We would like to avoid
> having to manually turn something off and then back on again.
>
> Is there a way the plugin can manage this?  Is there a different release
> plugin that can handle the PR process?
>
> Does anyone know if the BitBucket PR process can be bypassed for certain
> users using the maven release plugin?  That might be the simplest solution
> if that is possible.
>
> -Dave
>

Re: Best Maven practices for releasing components/applications when the SCM requires PRs?

Posted by Michael Osipov <mi...@apache.org>.
The subject is wrong. SCM does not require PRs, your SCM suite does. 
This is a difference.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org