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

Add "-r, --noprompt" flag to sfdx plugins:install command #83

Closed
ImJohnMDaniel opened this issue Apr 28, 2019 · 8 comments
Closed

Add "-r, --noprompt" flag to sfdx plugins:install command #83

ImJohnMDaniel opened this issue Apr 28, 2019 · 8 comments
Labels
feature Issue or pull request for a new feature wontfix We won't work on this issue

Comments

@ImJohnMDaniel
Copy link

ImJohnMDaniel commented Apr 28, 2019

Is your feature request related to a problem? Please describe.
If I setup a Jenkins CI build and specify the "sfdx" as a custom tool, I would also want to install custom plugins that I have created to aid in the build process. Currently, there is no way to execute sfdx plugins:install foo-bar without confirming the plugin installation since it is not digitally signed. Because of this, I cannot use the Jenkins Custom Tool plugin when I need specific custom SFDX CLI plugins as well.

What are you trying to do
I need a way to dynamically setup the SFDX CLI and plugins that I want to install via the Jenkins custom tool option.

Describe the solution you'd like
I would like a "-r, --noprompt" flag be added to plugins:install command so that I can automate on my CI builds the installation of the plugin after the installation of the SFDX CLI itself.

Describe alternatives you've considered
I could manually install the SFDX CLI and the plugins on the Jenkins server and not utilize the "custom tool" option, but then I would not be able to dynamically spin up slave Jenkins instances as needed.

@clairebianchi clairebianchi added the feature Issue or pull request for a new feature label Apr 30, 2019
@genoud
Copy link

genoud commented Sep 25, 2019

Hello @ImJohnMDaniel
A workarround to this issue:
echo y | sfdx plugins:install sfpowerkit

@ImJohnMDaniel
Copy link
Author

@genoud -- Thanks for the tip. That is exactly what we ended up doing and what led to this feature request. ;-)

@jpmonette
Copy link

@genoud That saved my life - thanks!

@mshanemc
Copy link
Contributor

mshanemc commented Dec 4, 2020

@ImJohnMDaniel there's two other more elegant options I'd suggest.

  1. if you're doing other npm installs for your CI, add your plugins as a dependency and then plugins:link them from the node_modules folder (when using plugins:link you don't get the code-signing check).
  2. add those plugins to your unsignedPluginAllowList.json. More info about that file here here: https://developer.salesforce.com/blogs/2017/10/salesforce-dx-cli-plugin-update.html

1 is probably the better option for CI because your CI may get some npm-caching benefits and more granular control of which version of the plugin you're running.

@aheber
Copy link

aheber commented Dec 4, 2020

@mshanemc, I'm on windows and this may be a more windows-specific problem but I've found that when I have a plugin linked then execution of all commands is slower as it seems to re-compile/process the linked plugins every time. I have never dug into the root cause, I just don't leave plugins linked as much as I used to.

(edited as I realized that solution was already provided above)

@mshanemc mshanemc added the wontfix We won't work on this issue label Jan 8, 2021
@github-actions
Copy link

github-actions bot commented Jan 8, 2021

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

@mshanemc mshanemc closed this as completed Jan 8, 2021
@ImJohnMDaniel
Copy link
Author

@mshanemc -- Apologies, I did not see your earlier comment from Dec 4, 2020. I am aware of both options that you are referring to in that post and neither are an option for me.

Just curious, why are you designating this as "wontfix". I would expect this to be an extremely small LOE -- Simply add the flag and put in an if/then statement.

@mshanemc
Copy link
Contributor

mshanemc commented Jul 9, 2021

It's the type of thing that won't fly with security.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue or pull request for a new feature wontfix We won't work on this issue
Projects
None yet
Development

No branches or pull requests

6 participants