CLI to import/export Jenkins jobs & plugins.
Below are the available downloads for the latest version of Butler (1.0.0). Please download the proper package for your operating system and architecture.
wget https://s3.us-east-1.amazonaws.com/butlercli/1.0.0/linux/butler
wget https://s3.us-east-1.amazonaws.com/butlercli/1.0.0/windows/butler
wget https://s3.us-east-1.amazonaws.com/butlercli/1.0.0/osx/butler
wget https://s3.us-east-1.amazonaws.com/butlercli/1.0.0/openbsd/butler
wget https://s3.us-east-1.amazonaws.com/butlercli/1.0.0/freebsd/butler
To install the library and command line program, use the following:
go get -u github.com/mlabouardy/butler
Username flag may also be provided via environment variable JENKINS_USER
and the password via JENKINS_PASSWORD
.
In order to always skip folders, you may set the environment variable JENKINS_SKIP_FOLDER
.
$ butler jobs export --server localhost:8080 --skip-folder
$ butler jobs import --server localhost:8080
$ butler plugins export --server localhost:8080
$ butler plugins import --server localhost:8080
$ butler credentials decrypt --server localhost:8080 --folder foo/bar > decryptedCredentials.json
$ cat decryptedCredentials.json | butler credentials apply --server localhost:8080 --folder bar/foo