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

[JENKINS-55284] Force update existing tags #392

Merged

Conversation

MarkEWaite
Copy link
Contributor

Place the test in the GitClientTest parameterized test class so that it will be tested on all three implementations and will test with the intentionally randomized fetch parameters.

Use the parameterized GitClientTest to run the test on all three
implementations (git, jgit, and jgitapache).  Allow the test
randomization in GitClientTest to intentionally vary fetch parameters.
Adapt plugin to CLI git 2.20.0 bug fix.

The git fetch behavior prior to git 2.20.0 was to update existing tags
without requiring a --force.  The newer versions require --force to
update existing tags.

Retain existing behavior for earlier versions, only use the --force
option to fetch for new versions of command line git.

Previous fix that was included in git client plugin 2.7.5 is necessary
but not sufficient.  There are two different paths to `git fetch` and
the earlier change only modified one of those two paths.  This modifies
the second.
The parameterized tests in GitClientTest better cover the case than this
test and are more likely to detect problems than this test.
@MarkEWaite MarkEWaite merged commit 9d143e7 into jenkinsci:stable-2.7 Jan 9, 2019
@MarkEWaite MarkEWaite deleted the force-update-existing-tags branch January 9, 2019 23:59
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

Successfully merging this pull request may close these issues.

1 participant