jenkins-zh / jenkins-cli

Jenkins CLI allows you to manage your Jenkins in an easy way. Jenkins 命令行客户端
http://www.jenkins-zh.cn/jenkins-cli/
MIT License
389 stars 78 forks source link

Add new feature to backup jenkins relying on thinBackup plugin #638

Closed jxr98 closed 2 years ago

jxr98 commented 3 years ago

Make sure that you've checked the boxes below before you submit PR:

Always

For the bug fixes or features only

codecov[bot] commented 3 years ago

Codecov Report

Merging #638 (92e4afb) into master (cd3ef72) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 92e4afb differs from pull request most recent head 3cf15f6. Consider uploading reports for the commit 3cf15f6 to get more accurate results

@@           Coverage Diff           @@
##           master     #638   +/-   ##
=======================================
  Coverage   37.98%   37.98%           
=======================================
  Files          13       13           
  Lines         416      416           
=======================================
  Hits          158      158           
  Misses        246      246           
  Partials       12       12           
Flag Coverage Δ
unittests 37.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0a0e878...3cf15f6. Read the comment docs.

jxr98 commented 3 years ago

This function backs up global and job specific configurations relying on thinBackup plugin. I found an url which can trigger thinBackup to backup, but it doesn't return any message. Thus, jcli cannot handle errors which may happen and cannot make sure that the backup succeeded. I figured out a solution which is the --check flag. If jcli can access the backup directory set in thinBackup plugin, '--check true' is recommended to be parsed to backup command and then jcli will check if a new directory which follows a name pattern is created.

LinuxSuRen commented 3 years ago

still working on this PR?

jxr98 commented 3 years ago

still working on this PR?

I think it is done for now and I created a pull request in thinBackup plugin repository. The pr is waiting to be reviewed. Now this backup function can not check if backup succeeds in remote computer.

LinuxSuRen commented 3 years ago

I think it is done for now

WIP means working in progress