ktdreyer/jenkins-job-wrecker

NotImplementedError: Don't know how to handle a non-empty <actions> element.

Opened this issue · 1 comments

Hi! I tried this tool for the first time and immediately got the error.

 jjwrecker -f /var/jenkins_home/jobs/frontend/config.xml -n 'frontend'
last called actions
Traceback (most recent call last):
  File "/usr/local/bin/jjwrecker", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/jenkins_job_wrecker/cli.py", line 195, in main
    yaml = root_to_yaml(root, args.name, args.ignore_actions_tag)
  File "/usr/local/lib/python3.7/dist-packages/jenkins_job_wrecker/cli.py", line 96, in root_to_yaml
    handlers.gen_yml(job, root)
  File "/usr/local/lib/python3.7/dist-packages/jenkins_job_wrecker/modules/handlers.py", line 16, in gen_yml
    self.registry.dispatch(self.component, handler_name, child, settings)
  File "/usr/local/lib/python3.7/dist-packages/jenkins_job_wrecker/registry.py", line 60, in dispatch
    self.registry[component][name](xml, parent)
  File "/usr/local/lib/python3.7/dist-packages/jenkins_job_wrecker/modules/handlers.py", line 40, in actions
    raise NotImplementedError("Don't know how to handle a "
NotImplementedError: Don't know how to handle a non-empty <actions> element.
cat /var/jenkins_home/jobs/frontend/config.xml | grep action
  <actions>
    <org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobAction plugin="pipeline-model-definition@1.8.4"/>
    <org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction plugin="pipeline-model-definition@1.8.4">
    </org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction>
  </actions>
pip3 install jenkins-job-wrecker
Collecting jenkins-job-wrecker
  Downloading https://files.pythonhosted.org/packages/9e/5d/043827e54b8816c509a8688df9355915e807dcd2fc8fecd493e6c4b9a7bb/jenkins-job-wrecker-1.10.0.tar.gz
Requirement already satisfied: python-jenkins in /usr/lib/python3/dist-packages (from jenkins-job-wrecker) (0.4.16)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from jenkins-job-wrecker) (3.13)
Building wheels for collected packages: jenkins-job-wrecker
  Running setup.py bdist_wheel for jenkins-job-wrecker ... done
  Stored in directory: /root/.cache/pip/wheels/cd/48/19/592fae33b77e4fefd1ecaed36a31702ef2fd38d635fd09887c
Successfully built jenkins-job-wrecker
Installing collected packages: jenkins-job-wrecker
Successfully installed jenkins-job-wrecker-1.10.0

Have you tried to use '-a' (--ignore-actions-tag) option to ignore actions tag ? Eg.
jjwrecker -f /var/jenkins_home/jobs/frontend/config.xml -n 'frontend' -a ?