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

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

Open
4n70w4 opened this issue Mar 9, 2021 · 1 comment

Comments

@4n70w4
Copy link

4n70w4 commented Mar 9, 2021

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="[email protected]"/>
    <org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction plugin="[email protected]">
    </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
@krdian
Copy link

krdian commented Jan 10, 2023

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 ?

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

No branches or pull requests

2 participants