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 support for generating a new plugin file based on current Jenkins folder #227

Closed
timja opened this issue Nov 16, 2020 · 4 comments · Fixed by #448
Closed

Add support for generating a new plugin file based on current Jenkins folder #227

timja opened this issue Nov 16, 2020 · 4 comments · Fixed by #448
Labels
enhancement New feature or request

Comments

@timja
Copy link
Member

timja commented Nov 16, 2020

Ideally it should support the following outputs:

  • console (human readable)
  • txt
  • yaml

The --list flag along with the --output flags can probably be used for this

Also relevant #226 and #173

@jehon
Copy link

jehon commented Oct 18, 2021

It should be great to generate the plugin.txt out of the jenkins, so that this tool could be used easily to copy plugins from instance to another instance...

@MarkEWaite
Copy link
Contributor

It should be great to generate the plugin.txt out of the jenkins, so that this tool could be used easily to copy plugins from instance to another instance...

The Jenkins groovy script console can generate the contents of a plugins.txt file with the script:

Jenkins.instance.pluginManager.plugins
    .collect()
    .sort { it.getShortName() }
    .each {
        plugin -> println("${plugin.getShortName()}:${plugin.getVersion()}")
    }
return

@pamgluss-slack
Copy link

I am confused, what does --output txt / --output yaml actually do right now? Isn't this their intended purpose?

@MarkEWaite
Copy link
Contributor

I am confused, what does --output txt / --output yaml actually do right now? Isn't this their intended purpose?

I use the following command to generate a plugins.txt file based on the existing plugins.txt file and available updates.

$ ./jenkins-plugin-cli.sh --jenkins-version 2.319.3 --plugin-download-directory ref/plugins --plugin-file plugins.txt --no-download --available-updates --output txt > x && mv x plugins.txt

In my case, it needs the "starter" plugins.txt file. It doesn't generate a fresh one from the ref/plugins directory.

cronik added a commit to cronik/jenkinsci-plugin-installation-manager-tool that referenced this issue Jun 20, 2022
Direct cli user messages to standard error rather than standard out. Standard out
is reserved for primary output, which in cases like `--list --output yaml` would
be the yaml formatted plugin list. This separation of output is consistent with
general cli guidelines, https://clig.dev/#the-basics.

Fixes: jenkinsci#377 jenkinsci#227
cronik added a commit to cronik/jenkinsci-plugin-installation-manager-tool that referenced this issue Jun 21, 2022
Direct cli user messages to standard error rather than standard out. Standard out
is reserved for primary output, which in cases like `--list --output yaml` would
be the yaml formatted plugin list. This separation of output is consistent with
general cli guidelines, https://clig.dev/#the-basics.

Fixes: jenkinsci#377 jenkinsci#284 jenkinsci#227
cronik added a commit to cronik/jenkinsci-plugin-installation-manager-tool that referenced this issue Jun 21, 2022
Direct cli user messages to standard error rather than standard out. Standard out
is reserved for primary output, which in cases like `--list --output yaml` would
be the yaml formatted plugin list. This separation of output is consistent with
general cli guidelines, https://clig.dev/#the-basics.

Fixes: jenkinsci#377 jenkinsci#284 jenkinsci#227
cronik added a commit to cronik/jenkinsci-plugin-installation-manager-tool that referenced this issue Jun 21, 2022
Direct cli user messages to standard error rather than standard out. Standard out
is reserved for primary output, which in cases like `--list --output yaml` would
be the yaml formatted plugin list. This separation of output is consistent with
general cli guidelines, https://clig.dev/#the-basics.

Fixes: jenkinsci#377 jenkinsci#284 jenkinsci#227
cronik added a commit to cronik/jenkinsci-plugin-installation-manager-tool that referenced this issue Jun 28, 2022
Direct cli user messages to standard error rather than standard out. Standard out
is reserved for primary output, which in cases like `--list --output yaml` would
be the yaml formatted plugin list. This separation of output is consistent with
general cli guidelines, https://clig.dev/#the-basics.

Fixes: jenkinsci#377 jenkinsci#284 jenkinsci#227
timja pushed a commit that referenced this issue Jun 28, 2022
Direct cli user messages to standard error rather than standard out. Standard out
is reserved for primary output, which in cases like `--list --output yaml` would
be the yaml formatted plugin list. This separation of output is consistent with
general cli guidelines, https://clig.dev/#the-basics.

Fixes: #377 #284 #227
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants