![]() |
|
|
|
|
Issue Type:
|
Improvement
|
|
Assignee:
|
Unassigned |
|
Components:
|
packer-plugin |
|
Created:
|
16/Feb/15 1:30 AM
|
|
Description:
|
I've run into a problem using packer-plugin when the json I'm trying to use is in a subdirectory.
For example, my Jenkins job is cloning a git repo containing various packer configurations (e.g. centos-6.5, rhel-6.5, etc.). Each one is in a separate folder and has a template.json and a scripts directory.
Under the Packer post-build actions I specify Packer Template File "centos-6.5/template.json".
When I run the job I get the following error:
[workspace] $ /var/lib/jenkins/tools/biz.neustar.jenkins.plugins.packer.PackerInstallation/packer-0.7.5/packer build -_only_=virtualbox-iso -debug "/var/lib/jenkins/jobs/Packer build/workspace/centos-6.5/template.json"
4 error(s) occurred:
- Bad script 'scripts/base.sh': stat scripts/base.sh: no such file or directory
- Bad script 'scripts/vagrant.sh': stat scripts/vagrant.sh: no such file or directory
- Bad script 'scripts/virtualbox.sh': stat scripts/virtualbox.sh: no such file or directory
- Bad script 'scripts/cleanup.sh': stat scripts/cleanup.sh: no such file or directory
It appears that the relative paths (such as scripts/base.sh) in template.json are expected to be in the current directory (which is workspace/) although I'm calling workspace/centos-6.5/template.json.
So when I changed the script paths in the json to be "centos-6.5/scripts/base.sh" it ran successfully, however, I don't want to do that as it breaks the script if I then try to run it from within centos-6.5 (which is the recommended way).
It would be great to have a "Change directory" parameter for packer-plugin to change the working directory before calling packer.
|
|
Environment:
|
Jenkins 1.598, packer plugin 1.0
|
|
Project:
|
Jenkins
|
|
Priority:
|
Minor
|
|
Reporter:
|
Tenyo Grozev
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[email protected].
For more options, visit
https://groups.google.com/d/optout.