I am getting below error while running "mvn release:prepare release:perform" using bitbucket pipelines. Could you please suggest how to resolve the same?
"[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4:prepare (default-cli) on project my-webapp: An error is occurred in the checkin process: Exception while executing SCM command. Detecting the current branch failed: fatal: ref HEAD is not a symbolic ref -> [Help 1]["
Pipelines checks out a specific revision/commit when it runs to help test each change to a project, leaving the working copy in "detached head" mode. Maven wants to make additional commits to your repo to record the changes to your pom.xml, and so must be on a branch.
At the beginning of your pipeline you'll want to reset the branch you want to release from, to the current commit. Assuming you're working from master, you would add
git checkout master
From here you'll be on head: master, and able to run maven release.
Please be aware that your release will fail if not running on the latest commit.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs