release went wrong?

351 views
Skip to first unread message

Sergei Butylin

unread,
Nov 19, 2021, 1:09:16 PM11/19/21
to jenkin...@googlegroups.com

Hello team, 

I’m one of the maintainers of Klocwork Jenkins Plugin (https://github.com/jenkinsci/klocwork-plugin)

We were releasing the new version using maven plugin and got a sudden error during release that looks like this:

[INFO] ------------------------------------------------------------------------

    [INFO] BUILD FAILURE

    [INFO] ------------------------------------------------------------------------

    [INFO] Total time:  59.575 s

    [INFO] Finished at: 2021-11-18T16:08:19-05:00

    [INFO] ------------------------------------------------------------------------

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project klocwork: Failed to deploy artifacts: Could not transfer artifact org.jenkins-ci.plugins:klocwork:hpi:2021.3-20211118.210816-1 from/to maven.jenkins-ci.org (https://repo.jenkins-ci.org/snapshots/): Transfer failed for https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.3-SNAPSHOT/klocwork-2021.3-20211118.210816-1.hpi 401 Unauthorized -> [Help 1]

    [ERROR]

    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

    [ERROR] Re-run Maven using the -X switch to enable full debug logging.

    [ERROR]

    [ERROR] For more information about the errors and possible solutions, please read the following articles:

    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException  

 

However I see that that git repository was still updated with 2 commits (https://github.com/jenkinsci/klocwork-plugin/commits/master) though missing “[maven-release-plugin] prepare release” commit.

As I understand that the state of repository is now inconsistent and new version won’t appear in Jenkins Plugins Web Store now.

Could you please help us to figure out how to fix this release?

 

Sincerely

Sergei

 


This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.


Gavin Mogan

unread,
Nov 19, 2021, 1:15:25 PM11/19/21
to Jenkins Developers
where are you seeing that message? If your doing a mvn release you should have a a version number you provided, if your using the CD system, you should have a link to where its failing.

The problem is your trying to release to the snapshot repo, which jenkins doesn't support. I'm a little confused why the URL says 2021.3-SNAPSHOT while the version is 2021.3-$timestamp

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/DM6PR20MB26660A4E5E7B2A307F496E37AD9C9%40DM6PR20MB2666.namprd20.prod.outlook.com.

Sergei Butylin

unread,
Nov 19, 2021, 1:28:09 PM11/19/21
to jenkin...@googlegroups.com

I got the message while doing “mvn release:prepare release:perform

We’ve been following the same steps here https://wiki.jenkins.io/display/JENKINS/Hosting+Plugins and here https://www.jenkins.io/doc/developer/publishing/releasing-manually/ and previous releases went well.

 

Question is how can we rollback the failed release that you can see in github history here https://github.com/jenkinsci/klocwork-plugin/commits/master and try do 2021.3 the release again?

To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_DutHH-k408_urHprOozLh0%2Bs5xaAZhDzUM-UkAtZQBSreA%40mail.gmail.com.

CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.

 

Mark Waite

unread,
Nov 19, 2021, 1:59:34 PM11/19/21
to Jenkins Developers
On Friday, November 19, 2021 at 11:28:09 AM UTC-7 Sergei Butylin wrote:

I got the message while doing “mvn release:prepare release:perform

We’ve been following the same steps here https://wiki.jenkins.io/display/JENKINS/Hosting+Plugins and here https://www.jenkins.io/doc/developer/publishing/releasing-manually/ and previous releases went well.

 

Question is how can we rollback the failed release that you can see in github history here https://github.com/jenkinsci/klocwork-plugin/commits/master and try do 2021.3 the release again?


I've not had great results personally with attempting to redo a maven release.  However, if you've retained the directory where you performed the original `mvn release:prepare release:perform` you could try running `mvn release:perform` another time.

Before attempting `mvn release:perform`, you should confirm that you have permission to push your release to https://repos.jenkins-ci.org/ .  I believe that one way to do that would be with the following commands to deploy a snapshot of your plugin from another working directory (don't do this from the directory where you attempted the previous mvn release:prepare release:perform):

$ cd /tmp
$ cd klocwork-plugin
$ mvn deploy

If that succeeds, you will have deployed a snapshot version of the default branch to the snapshots section of repos.jenkins-ci.org

If that fails, you probably need to reset your password at https://accounts.jenkins.io or at https://beta.accounts.jenkins.io

Mark Waite

Gavin Mogan

unread,
Nov 19, 2021, 2:04:09 PM11/19/21
to Jenkins Developers
you can also mvn release:rollback and possibly delete the git tag.
or git reset to before you made the attempt and delete the git tag

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.

Sergei Butylin

unread,
Nov 19, 2021, 4:45:25 PM11/19/21
to jenkin...@googlegroups.com

“mvn deploy” failed at first and you were right - credentials seemed to be expired and I had to update it.

After update “mvn deploy” from clean folder succeeded however when I tried doing ‘mvn release:prepare release:perform’ from my original folder I got

 

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  5.464 s

[INFO] Finished at: 2021-11-19T16:32:57-05:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare (default-cli) on project klocwork: Unable to tag SCM

[ERROR] Provider message:

[ERROR] The git-tag command failed.

[ERROR] Command output:

[ERROR] fatal: tag 'klocwork-2021.3' already exists

 

I imagine this is because initial release pushed something to github and possibly to release repository..

Is there a way to fix it you assume and have it released under 2021.3  version? Or the only way now is to release it with another version?

 

From: jenkin...@googlegroups.com <jenkin...@googlegroups.com> On Behalf Of Mark Waite
Sent: Friday, November 19, 2021 2:00 PM
To: Jenkins Developers <jenkin...@googlegroups.com>
Subject: Re: release went wrong?

 

 

On Friday, November 19, 2021 at 11:28:09 AM UTC-7 Sergei Butylin wrote:

--

You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.

CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.

 

Gavin Mogan

unread,
Nov 19, 2021, 4:47:23 PM11/19/21
to Jenkins Developers
It's saying the git tag already exists.

git tag -d tagname
git push origin :tagname

Jesse Glick

unread,
Nov 19, 2021, 4:54:06 PM11/19/21
to jenkin...@googlegroups.com
On Fri, Nov 19, 2021 at 4:47 PM 'Gavin Mogan' via Jenkins Developers <jenkin...@googlegroups.com> wrote:
It's saying the git tag already exists.

One of many headaches you need to deal with when using `maven-release-plugin`, along with local credentials. You may consider https://www.jenkins.io/doc/developer/publishing/releasing-cd/ as an alternative. 

Sergei Butylin

unread,
Nov 19, 2021, 5:08:29 PM11/19/21
to jenkin...@googlegroups.com

After deleting klocwork-2021.3 tag do I really need to push the changes to origin cause it looks like they were pushed during initial “failed” release (https://github.com/jenkinsci/klocwork-plugin/commit/143dcf09a6c58c7a5bd46ab67ae93647a10d7149)

Or should I just try ‘mvn release:prepare release:perform’ again?

 

From: ga...@gavinmogan.com <ga...@gavinmogan.com> On Behalf Of 'Gavin Mogan' via Jenkins Developers

CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.

 

Sergei Butylin

unread,
Nov 19, 2021, 5:09:40 PM11/19/21
to jenkin...@googlegroups.com

We will definitely consider it for the next release.. however current release needs to be fixed somehow

 

From: 'Jesse Glick' via Jenkins Developers <jenkin...@googlegroups.com>
Sent: Friday, November 19, 2021 4:54 PM
To: jenkin...@googlegroups.com
Subject: Re: release went wrong?

 

On Fri, Nov 19, 2021 at 4:47 PM 'Gavin Mogan' via Jenkins Developers <jenkin...@googlegroups.com> wrote:

It's saying the git tag already exists.

 

One of many headaches you need to deal with when using `maven-release-plugin`, along with local credentials. You may consider https://www.jenkins.io/doc/developer/publishing/releasing-cd/ as an alternative. 

--

You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.

CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.

 

Gavin Mogan

unread,
Nov 19, 2021, 5:16:52 PM11/19/21
to Jenkins Developers
`git push origin :tagname` will delete that ref from your remote
You probably will be fine, I think git lets you override tags without issue, but that's usually how I delete things

Sergei Butylin

unread,
Nov 19, 2021, 6:00:01 PM11/19/21
to jenkin...@googlegroups.com

After all of the manipulations release task completed successfully.

I don’t see any updates in the github here however (https://github.com/jenkinsci/klocwork-plugin/commits/master)

It’s in the same state that it was after initial failed release. I’m not sure if it’s ok cause it’s missing [maven-release-plugin] prepare release step that I saw during previous releases. Not sure if it’s ok.

I guess now I just have to wait and hope that 2021.3 version arrears on https://repo.jenkins-ci.org/artifactory/releases/org/jenkins-ci/plugins/klocwork/ page after some time?

 

Here is the tail of the log I got after running `mvn release:prepare release:perform`

 

    [INFO] --- maven-install-plugin:3.0.0-M1:install (default-install) @ klocwork ---

    [INFO] Installing D:\work\PR-49836_host_plugin\github\klocwork-plugin\target\checkout\target\klocwork.hpi to C:\Users\sbutylin\.m2\repository\org\jenkins-ci\plugins\klocwork\2021.4-SNAPSHOT\klocwork-2021.4-SNAPSHOT.hpi

    [INFO] Installing D:\work\PR-49836_host_plugin\github\klocwork-plugin\target\checkout\pom.xml to C:\Users\sbutylin\.m2\repository\org\jenkins-ci\plugins\klocwork\2021.4-SNAPSHOT\klocwork-2021.4-SNAPSHOT.pom

    [INFO] Installing D:\work\PR-49836_host_plugin\github\klocwork-plugin\target\checkout\target\klocwork.jar to C:\Users\sbutylin\.m2\repository\org\jenkins-ci\plugins\klocwork\2021.4-SNAPSHOT\klocwork-2021.4-SNAPSHOT.jar

    [INFO] Installing D:\work\PR-49836_host_plugin\github\klocwork-plugin\target\checkout\target\klocwork-sources.jar to C:\Users\sbutylin\.m2\repository\org\jenkins-ci\plugins\klocwork\2021.4-SNAPSHOT\klocwork-2021.4-SNAPSHOT-sources.jar

    [INFO] Installing D:\work\PR-49836_host_plugin\github\klocwork-plugin\target\checkout\target\klocwork-javadoc.jar to C:\Users\sbutylin\.m2\repository\org\jenkins-ci\plugins\klocwork\2021.4-SNAPSHOT\klocwork-2021.4-SNAPSHOT-javadoc.jar

    [INFO]

    [INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ klocwork ---

    Downloading from maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/maven-metadata.xml

    Downloaded from maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/maven-metadata.xml (957 B at 1.4 kB/s)

    Uploading to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/klocwork-2021.4-20211119.225119-2.hpi

    Uploaded to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/klocwork-2021.4-20211119.225119-2.hpi (1.5 MB at 764 kB/s)

    Uploading to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/klocwork-2021.4-20211119.225119-2.pom

    Uploaded to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/klocwork-2021.4-20211119.225119-2.pom (8.4 kB at 20 kB/s)

    Downloading from maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/maven-metadata.xml

    Downloaded from maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/maven-metadata.xml (509 B at 4.3 kB/s)

    Uploading to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/maven-metadata.xml

    Uploaded to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/maven-metadata.xml (957 B at 3.5 kB/s)

    Uploading to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/maven-metadata.xml

    Uploaded to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/maven-metadata.xml (451 B at 1.4 kB/s)

    Uploading to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/klocwork-2021.4-20211119.225119-2.jar

    Uploaded to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/klocwork-2021.4-20211119.225119-2.jar (251 kB at 440 kB/s)

    Uploading to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/maven-metadata.xml

    Uploaded to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/maven-metadata.xml (957 B at 3.4 kB/s)

    Uploading to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/klocwork-2021.4-20211119.225119-2-sources.jar

    Uploaded to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/klocwork-2021.4-20211119.225119-2-sources.jar (195 kB at 358 kB/s)

    Uploading to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/maven-metadata.xml

    Uploaded to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/maven-metadata.xml (1.2 kB at 4.2 kB/s)

    Uploading to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/klocwork-2021.4-20211119.225119-2-javadoc.jar

    Uploaded to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/klocwork-2021.4-20211119.225119-2-javadoc.jar (550 kB at 680 kB/s)

    Uploading to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/maven-metadata.xml

    Uploaded to maven.jenkins-ci.org: https://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/klocwork/2021.4-SNAPSHOT/maven-metadata.xml (1.4 kB at 5.2 kB/s)

    [INFO] ------------------------------------------------------------------------

    [INFO] BUILD SUCCESS

    [INFO] ------------------------------------------------------------------------

    [INFO] Total time:  55.665 s

    [INFO] Finished at: 2021-11-19T17:51:25-05:00

    [INFO] ------------------------------------------------------------------------

[INFO] Cleaning up after release...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  01:10 min

[INFO] Finished at: 2021-11-19T17:51:26-05:00

[INFO] ------------------------------------------------------------------------

CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.

 

Gavin Mogan

unread,
Nov 19, 2021, 6:05:25 PM11/19/21
to Jenkins Developers
That's still deploying a snapshot. I thought snapshots were flat out disallowed, but they won't show up anywhere. You should be releasing a release

Sergei Butylin

unread,
Nov 19, 2021, 6:22:19 PM11/19/21
to jenkin...@googlegroups.com

That’s what missing [maven-release-plugin] prepare release] step was doing previously I guess. Like here  https://github.com/jenkinsci/klocwork-plugin/commit/4ed411006883ba7d5a656becd60d60a679e347a8

It was happening automatically when running `mvn release:prepare release:perform`

And it’s not doing it now so does it look like this version is not fixable and I have to do another release with new version now? Or is it possible to change snapshot to release version and manually trigger the release somehow?

CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.

 

Tim Jacomb

unread,
Nov 20, 2021, 3:52:19 AM11/20/21
to jenkin...@googlegroups.com
Just release a new version…
Jenkins won’t offer older versions to users anyway, so skipping a version isn’t an issue

Reply all
Reply to author
Forward
0 new messages