jenkins-x-plugins/jx-release-version

FATAL error in custom values of --tag-prefix=""

Opened this issue · 4 comments

I test the plugin from [2.6.3] until [2.6.6]

I customize in jx3 mi next version with this code because I don't want the "v" in the name of tag:

         - image: ghcr.io/jenkins-x/jx-release-version:2.6.6
          name: my-nextversion-master-minor
          resources: {}
          script: |
            #!/usr/bin/env sh
            set -x
            if [ "$PULL_BASE_REF" == "master" ] || [ "$PULL_BASE_REF" == "main" ]; then
                jx-release-version -next-version=increment:minor --debug --tag --tag-prefix="" > VERSION
            else
                jx-release-version -next-version=increment:patch --debug --tag --tag-prefix="" > VERSION
            fi
            cat VERSION

But I received a "false" error in the push process:

jx-release-version '-next-version=increment:patch' --debug --tag '--tag-prefix='
DEBUG: jx-release-version 2.6.6-dev+4b57fec running in debug mode in /workspace/source
DEBUG: Using "auto" version reader (with "")
DEBUG: Trying to read the previous version from the git tags first...
DEBUG: Found 55 semver tags with pattern ""
DEBUG: Previous version: 1.7.3
DEBUG: Using "increment" version bumper (with "patch")
DEBUG: Incrementing patch component
DEBUG: Next version: 1.7.4
DEBUG: git tag -a 1.7.4 -m "Release version 1.7.4"
DEBUG: git push --tags
FATAL: Failed to tag using version 1.7.4: failed to push tags to origin: authentication required
cat VERSION
1.7.4

But in my github repo the tag is correctly uploaded:

image

Why the FATAL error?

good question - it shouldn't both fail to push the tags and have succeeded at the same time ;-)

The problem about this is not only esthetic. If you don't write a "positive command" later (cat VERSION) the pipeline failed :/

I wonder if it's due to a step after the tagging failing 🤔annoying that that's the only error log

If you run those tags yourself, does it still push to git?

git tag -a 1.7.4 -m "Release version 1.7.4"
git push --tags

(I'm thinking this might be a github problem)

If I don't use --tag-prefix="" (use the normal tag with prefix "v" -> jx-release-version -next-version=increment:minor --tag > VERSION) the problem doesn't appear :S