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

Support for copying file from Jenkins host to agents #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonkipu
Copy link

@jonkipu jonkipu commented Aug 28, 2022

This change adds a config option for the host to allow selecting Jenkins File Credentials items to be uploaded to a path relative to the agent's User home folder, this was useful to me in some cases where I was using tools requiring specific config files including password / tokens etc (.npmrc, .aws config, ssh config)

Pretty similar to #15 but I needed it to be more generic

Unsure to write tests for such a feature since I'm pretty new to Jenkins plugins, would love some guidance in this area

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main 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

@mat1e
Copy link
Member

mat1e commented Aug 30, 2022

Hi @jonkipu, the code looks clean thank you. Please add somes tests, especially for the new method uploadHostFile. I will try your feature and let you know.

@jonkipu
Copy link
Author

jonkipu commented Aug 30, 2022

Thanks I will try to add some tests, also I want to fix a possible security issue with the path resolving to make sure you can't "escape" the home folder. Will update you when I'm done

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.

None yet

2 participants