Bamboo doesn't import Jenkins data - No secret key file found
Symptoms
Bamboo shows this error message when pointing to a Jenkins Home directory and trying to import Jenkins data into Bamboo:
2013-08-09 10:28:31,967 WARN [qtp629450710-116] [Jenkins] No secret key file found. Will be unable to decode encrypted data
2013-08-09 10:28:31,973 ERROR [qtp629450710-116] [SelectJobsForImport] Error while scanning for Jenkins Jobs
java.io.IOException: Job configuration directory not found in /jenkins/
at com.atlassian.bamboo.jenkins.importer.core.JenkinsDataReader.initializeDataDirectories(JenkinsDataReader.java:213)
at com.atlassian.bamboo.jenkins.importer.core.JenkinsDataReader.<init>(JenkinsDataReader.java:57)
at com.atlassian.bamboo.jenkins.importer.action.SelectJobsForImport.getDataReader(SelectJobsForImport.java:150)
at com.atlassian.bamboo.jenkins.importer.action.SelectJobsForImport.doExecute(SelectJobsForImport.java:125)
at com.atlassian.bamboo.ww2.BambooActionSupport.execute(BambooActionSupport.java:1060)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
...
Cause
Bamboo expects to find the secret.key file in the Jenkins Home directory, but the mentioned file is missing.
Another possible root cause could be that you are trying to use the zip archive method but because you have nested folders before the secret key, Bamboo throws the above exception. For example jenkins.zip >> jenkins >> secret_key+ other_file
will fail. It should be jenkins.zip >> secret_key+other_file
works
Resolution
If you are using an old Jenkins version, copy the secret.key file into the Jenkins Home directory and try the import again.