-
-
Notifications
You must be signed in to change notification settings - Fork 187
Closed
Description
We have a very simple "mock" gitflow project we're attempting to prove out with this plugin via Jenkins and Bitbucket. When we run a release build via Jenkins, it calls:
withMaven(maven: 'Maven_3.6.0') {
echo 'Publishing release artifact...'
sh 'mvn -B gitflow:release'
}
Our pom.xml
file has:
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.17.0</version>
<configuration>
<gitFlowConfig>
<versionTagPrefix>v</versionTagPrefix>
</gitFlowConfig>
<verbose>true</verbose>
<releaseMergeFFOnly>true</releaseMergeFFOnly>
</configuration>
</plugin>
We create a merge request from develop
to master
which triggers the release build. For some reason, the plugin errors with a fairly vague message:
[2022-02-11T14:50:08.401Z] [INFO] --- gitflow-maven-plugin:1.17.0:release (default-cli) @ mock-java-shared-library ---
[2022-02-11T14:50:09.312Z] [INFO] Checking for uncommitted changes.
[2022-02-11T14:50:09.563Z] [INFO] Local branch 'develop' doesn't exist. Trying to fetch and check it out from 'origin'.
[2022-02-11T14:50:09.563Z] [INFO] Fetching remote branch 'origin develop'.
[2022-02-11T14:50:09.563Z] [WARNING] There were some problems fetching remote branch 'origin develop'. You can turn off remote branch fetching by setting the 'fetchRemote' parameter to false.
[2022-02-11T14:50:09.563Z] [INFO] Creating a new branch 'develop' from 'origin/develop' and checking it out.
[2022-02-11T14:50:09.563Z] [INFO] ------------------------------------------------------------------------
[2022-02-11T14:50:09.563Z] [INFO] BUILD FAILURE
[2022-02-11T14:50:09.563Z] [INFO] ------------------------------------------------------------------------
[2022-02-11T14:50:09.563Z] [INFO] Total time: 1.499 s
[2022-02-11T14:50:09.563Z] [INFO] Finished at: 2022-02-11T14:50:09Z
[2022-02-11T14:50:09.563Z] [INFO] ------------------------------------------------------------------------
[2022-02-11T14:50:09.563Z] [INFO] [jenkins-event-spy] Generated /var/lib/jenkins/workspace/_mock-java-shared-library_master@tmp/withMaven9fd2a0b6/maven-spy-20220211-145007-6598075854275732752913.log
[2022-02-11T14:50:09.563Z] [ERROR] Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.17.0:release (default-cli) on project mock-java-shared-library: release: fatal: 'origin/develop' is not a commit and a branch 'develop' cannot be created from it -> [Help 1]
[2022-02-11T14:50:09.563Z] [ERROR]
[2022-02-11T14:50:09.563Z] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[2022-02-11T14:50:09.563Z] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[2022-02-11T14:50:09.563Z] [ERROR]
[2022-02-11T14:50:09.563Z] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[2022-02-11T14:50:09.563Z] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
script returned exit code 1
It is difficult to understand what "some problems" means and we already have verbose
set to true. Any advice on what may be wrong with this setup? We absolutely have an origin/develop
branch since this is the source of the PR:
Metadata
Metadata
Assignees
Labels
No labels