Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rupertgti opened this issue Apr 5, 2023 · 4 comments
Open

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

rupertgti opened this issue Apr 5, 2023 · 4 comments

Comments

@rupertgti
Copy link

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?

@vbehar
Copy link
Collaborator

vbehar commented Apr 5, 2023

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

@rupertgti
Copy link
Author

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

@tomhobson
Copy link
Contributor

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)

@rupertgti
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants