This is a CLI tool to manage Jenkins plugins.
Main features are:
- Install plugins from
JenkinsPlugins.lock - Upgrade plugins installed
- Dump installed plugins to
JenkinsPlugins.lock - Print installed plugins
$ git clone https://github.com/Kuniwak/jenkins-plugin-fixator ~/.jenkins-plugin-fixator
$ echo 'export PATH="$HOME/.jenkins-plugin-fixator/bin:$PATH"' >> ~/.bash_profile
$ exec $SHELL -l- Java 1.8 or later
- curl 7 or later
Install Jenkins plugins from JenkinsPlugins.lock (requied $ENDPOINT).
$ ENDPOINT="http://my-jenkins.example.com:8080" jenkins-plugin-fixator installUpgrade plugins from JenkinsPlugins.lock and update JenkinsPlugins.lock (requied $ENDPOINT).
$ ENDPOINT="http://my-jenkins.example.com:8080" jenkins-plugin-fixator upgradeDump installed plugins to JenkinsPlugins.lock (requied $ENDPOINT).
$ ENDPOINT="http://my-jenkins.example.com:8080" jenkins-plugin-fixator dumpList installed plugins (requied $ENDPOINT).
$ ENDPOINT="http://my-jenkins.example.com:8080" jenkins-plugin-fixator listWait until Jenkins is ready (requied $ENDPOINT).
$ ENDPOINT="http://my-jenkins.example.com:8080" jenkins-plugin-fixator awaitPrint the help and exit successfully.
$ jenkins-plugin-fixator helpJenkinsPlugins.lock is a file that have a list of plugin names and versions.
This is an example for JenkinsPlugins.lock:
ssh-credentials SSH Credentials Plugin 1.12
git-client Git client plugin 2.0.0 (2.1.0)
As you can see, this format is equivalent to the result of JenkinsCLI's list-plugins.
$ENDPOINT is an endpoint URL for your Jenkins master.
This is an example for $ENDPOINT:
ENDPOINT="http://my-jenkins.example.com:8080"
NOTE: this URL MUST not include / at last.
The MIT License (MIT)
Copyright (c) 2016 Kuniwak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.