ktdreyer/jenkins-job-wrecker

Support Folders

Closed this issue · 0 comments

Jenkins has Folders that provide a namespace for projects.
https://wiki.jenkins-ci.org/display/JENKINS/CloudBees+Folders+Plugin

In general, jjw works fine, it just fails to create the output folder structure:

$ jjwrecker -s http://jenkins -n "MyFolder/MyProject"
jjwrecker INFO: looking up job "MyFolder/MyProject"
jjwrecker INFO: converting job "MyFolder/MyProject" to YAML
Traceback (most recent call last):
  File "jenkins-job-wrecker/venv/bin/jjwrecker", line 9, in <module>
    load_entry_point('jenkins-job-wrecker', 'console_scripts', 'jjwrecker')()
  File "jenkins-job-wrecker/jenkins_job_wrecker/cli.py", line 234, in main
    output_file = open(yaml_filename, 'w')
IOError: [Errno 2] No such file or directory: 'output/MyFolder/MyProject.yml'

Manually running mkdir -p output/MyFolder beforehand makes it successfully output the yml file.