https://github.com/mlabouardy/butler
Export/Import Jenkins jobs & plugins 📤
https://github.com/mlabouardy/butler
backup cli continuous-integration jenkins jenkins-jobs jenkins-plugin
Last synced: 8 months ago
JSON representation
Export/Import Jenkins jobs & plugins 📤
- Host: GitHub
- URL: https://github.com/mlabouardy/butler
- Owner: mlabouardy
- License: mit
- Created: 2018-01-04T19:51:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-22T08:37:11.000Z (about 7 years ago)
- Last Synced: 2025-01-31T06:51:20.235Z (over 1 year ago)
- Topics: backup, cli, continuous-integration, jenkins, jenkins-jobs, jenkins-plugin
- Language: Go
- Homepage:
- Size: 2.6 MB
- Stars: 123
- Watchers: 11
- Forks: 34
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://circleci.com/gh/mlabouardy/butler) [](LICENSE)
CLI to import/export Jenkins jobs & plugins.
## Usage
## Download
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.
### Linux:
```
wget https://s3.us-east-1.amazonaws.com/butlercli/1.0.0/linux/butler
```
### Windows:
```
wget https://s3.us-east-1.amazonaws.com/butlercli/1.0.0/windows/butler
```
### Mac OS X:
```
wget https://s3.us-east-1.amazonaws.com/butlercli/1.0.0/osx/butler
```
### OpenBSD:
```
wget https://s3.us-east-1.amazonaws.com/butlercli/1.0.0/openbsd/butler
```
### FreeBSD:
```
wget https://s3.us-east-1.amazonaws.com/butlercli/1.0.0/freebsd/butler
```
## Installation
To install the library and command line program, use the following:
```
go get -u github.com/mlabouardy/butler
```
## Available Commands
### Generic environment variables
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`.
### Jobs Management
```
$ butler jobs export --server localhost:8080 --skip-folder
```
```
$ butler jobs import --server localhost:8080
```
### Plugins Management
```
$ butler plugins export --server localhost:8080
```
```
$ butler plugins import --server localhost:8080
```
### Credentials Management
```
$ butler credentials decrypt --server localhost:8080 --folder foo/bar > decryptedCredentials.json
```
```
$ cat decryptedCredentials.json | butler credentials apply --server localhost:8080 --folder bar/foo
```
## Tutorials
* [Butler CLI: Import/Export Jenkins Plugins & Jobs](http://www.blog.labouardy.com/butler-cli-import-export-jenkins-plugins-jobs/)