Skip to content

Question: Precommit hook for tag creation fails but build continues? #135

@emeraldjava

Description

@emeraldjava

I have an odd scenario with a standard releaser build.

I'm running this maven command

mvn -X com.github.danielflower.mavenplugins:multi-module-maven-release-plugin:3.6.1:release -DpullTags=true

In the log below I see the existing auto-generated tags being read, and the correct 1.4.2 tag being calculated as the next release

[DEBUG] file=/sys_apps_01/jenkins/workspace/nt_e074820_e074820-builds_master/.git/refs/tags/e074820-builds-1.4.0, isRacyClean=false, read=2023-02-17 05:30:10.193445000, lastModified=2023-02-17 03:33:21.467607000, delta=7008725838000 ns, racy<=3525000 ns
[DEBUG] file=/sys_apps_01/jenkins/workspace/nt_e074820_e074820-builds_master/.git/refs/tags/e074820-builds-1.4.0, is unmodified
[DEBUG] file=/sys_apps_01/jenkins/workspace/nt_e074820_e074820-builds_master/.git/refs/tags/e074820-builds-1.4.1, isRacyClean=false, read=2023-02-17 05:30:10.194363000, lastModified=2023-02-17 05:26:38.961419000, delta=211232944000 ns, racy<=3525000 ns
[DEBUG] file=/sys_apps_01/jenkins/workspace/nt_e074820_e074820-builds_master/.git/refs/tags/e074820-builds-1.4.1, is unmodified
[DEBUG] file=/sys_apps_01/jenkins/workspace/nt_e074820_e074820-builds_master/.git/refs/tags/e074820-builds-1.4.2.lock, isRacyClean=false, read=2023-02-17 05:30:12.405579000, lastModified=2023-02-17 05:30:12.402019000, delta=3560000 ns, racy<=3525000 ns
[DEBUG] file=/sys_apps_01/jenkins/workspace/nt_e074820_e074820-builds_master/.git/refs/tags/e074820-builds-1.4.2.lock, is unmodified
[DEBUG] file=/sys_apps_01/jenkins/workspace/nt_e074820_e074820-builds_master/.git/refs/tags/v230217.0924, isRacyClean=false, read=2023-02-17

I then see this block, there the new tag is created in the local git repo but cannot be pushed.

[DEBUG] git< unpack ok
[DEBUG] git< ng refs/tags/e074820-builds-1.4.2 pre-receive hook declined
[DEBUG] git< 0000

The system then goes onto build, publishing a jar but with no git tag.

[INFO] About to run mvn [deploy, -DskipTests=true] with profiles []
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T10:41:47-06:00)
Maven home: /sys_apps_01/maven/apache-maven-3.3.9
Java version: 11.0.6, vendor: Azul Systems, Inc.
Java home: /sys_apps_01/java/zulu1.11.0_6
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1160.71.1.0.1.el7.x86_64", arch: "amd64", family: "unix"
[DEBUG] Created new class realm maven.api

While the maven artifacts are generated, it's not clear which commit the release is taken from. I might have expected the plugin to fail early in this case.

Just interested to know if this issue has been seen before?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions