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

Multiple enhancements #6

Merged
merged 14 commits into from
Dec 3, 2018
Merged

Multiple enhancements #6

merged 14 commits into from
Dec 3, 2018

Conversation

icereed
Copy link
Contributor

@icereed icereed commented Nov 14, 2018

This would solve #4 and #3.
Additionally you may skip folder for exporting.

Summary of new features

  1. Able to provide the flags via ENV variable
  2. Able to specify https URLs
  3. Add credential management (decrypt and apply)
  4. Added flag to ignore folders
  5. Added test cases
  6. Enable import/export into folders

Summary of fixes

  1. Fix not to stop importing if one job fails

@ambakshi
Copy link

Oh man, I just went to solve the same problem :P

main.go Show resolved Hide resolved
@icereed
Copy link
Contributor Author

icereed commented Nov 18, 2018

@mlabouardy this PR looks ready. Would you like to draft the new version or should I do it in this PR?

@icereed
Copy link
Contributor Author

icereed commented Nov 25, 2018

@mlabouardy Could you take a look please?

icereed and others added 11 commits November 27, 2018 07:40
This enables migration of credentials between Jenkins instances.

Butler will get the XML config of any folder and will ingest
the encrypted secrets. The encrypted secrets are then decrypted
via a Groovy script executed on Jenkins master. This needs
most of the times admin privileges.

In a second step you can pipe in the decrypted credentials
and apply them to another folder or even instance.
Also a Groovy script is leveraged in order to achieve this.
Previously it was not possible to export and import from and to folders.
In order to achieve this a new parameter `--folder` is introduced.
Given this parameter it will resolve the URL of the folder and
export/import jobs there.

In order to achieve this, the API endpoint /api/xml of a folder is used
(also the for the "root" folder) instead of /view/all/api/xml in order
not to rely on special view, which is only existing in root.

Also a bug is fixed if an old version of Jenkins does not
support crumb issueing.
This enables migration of credentials between Jenkins instances.

Butler will get the XML config of any folder and will ingest
the encrypted secrets. The encrypted secrets are then decrypted
via a Groovy script executed on Jenkins master. This needs
most of the times admin privileges.

In a second step you can pipe in the decrypted credentials
and apply them to another folder or even instance.
Also a Groovy script is leveraged in order to achieve this.
Butler stopped importing jobs if any job was existing
already or was malformatted.
Now the error is printed out, but the
import will keep working.
This was needed, because special characters we're not correctly interpreted.
@r-divakaran-hrs
Copy link

Can we please merge this !?

This feature is useful if you want to export a folder tree.

Also made the first step into refactoring the HTTP request handling.
This is handy if you want to avoid typing the server name.
@icereed
Copy link
Contributor Author

icereed commented Dec 3, 2018

is this repo not maintained?

@mlabouardy mlabouardy merged commit 4016f78 into mlabouardy:master Dec 3, 2018
@mlabouardy
Copy link
Owner

@icereed @ambakshi sorry for late response guys

This was referenced Dec 3, 2018
@icereed
Copy link
Contributor Author

icereed commented Dec 3, 2018

The pipeline fails, because there are no working credentials for S3 in Circle CI.

@mlabouardy
Copy link
Owner

@icereed fixed

@icereed
Copy link
Contributor Author

icereed commented Dec 4, 2018

Feature is released :party:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants