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

Allow removing path prefixes #192

Merged
merged 7 commits into from
May 19, 2021
Merged

Allow removing path prefixes #192

merged 7 commits into from
May 19, 2021

Conversation

vadakr
Copy link
Contributor

@vadakr vadakr commented May 14, 2021

Fixes #191

File Description
WAStoragePublisher.java - added a removePathPrefix property with a getter/setter
- added a trailing slash to it if not explicitly specified
UploadService.java - modified the signature of getItemPath to accept ServiceData for testability
- added a new removePrefix method that does the actual work of removing the prefix from the path
UploadToBlobService.java - injecting ServiceData into the getItemPath call
UploadToFileService.java - injecting ServiceData into the getItemPath call
UploadServiceData.java - added a removePathPrefix property with a getter/setter
Messages.properties - verbose logging messages when the prefix is being removed
config.jelly - new 'Remove prefix' option in the UI
config.properties - a title for the new 'Remove prefix' option in the UI
help-removePrefixPath.html - help for the new 'Remove prefix' option
UploadServiceTest - unit tests for prefix path removal in 8 scenarios controlled by 3 parameters - remove prefix path (Y/N), virtual path (Y/N) and embedded virtual path (Y/N)

NOTE: I have not run an end-to-end test!

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally looks ok, but i'll test manually before merge, can you revert all the * import changes throughout

@timja timja changed the title #191 Implemented the 'Remove prefix' functionality Allow removing path prefixes May 19, 2021
@timja timja enabled auto-merge (squash) May 19, 2021 16:04
@timja timja merged commit 5c00141 into jenkinsci:master May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Remove prefix" functionality
3 participants