Yes i have access on jenkins server.
This build is for Amazon AMI.
Output from Prompt
# pwd
/var/lib/jenkins/workspace/amibuild
# packer build -debug templates/rhel.template
Debug mode enabled. Builds will not be parallelized.
amazon-ebs output will be in this color.
==> amazon-ebs: Prevalidating AMI Name...
==> amazon-ebs: Pausing after run of step 'StepPreValidate'. Press enter to continue.
==> amazon-ebs: Inspecting the source AMI...
This is working. When i do through jenkins then jenkins logs showing below error
Nov 28, 2015 7:47:16 AM org.kohsuke.stapler.RequestImpl injectSetters
WARNING: Tried to set value to templateMode but method public void biz.neustar.jenkins.plugins.packer.PackerPublisher.setTemplateMode(java.lang.String) is missing @DataBoundSetter
Nov 28, 2015 7:47:21 AM hudson.model.Run execute
INFO: amibuild #9 main build action completed: SUCCESS
Nov 28, 2015 7:47:21 AM biz.neustar.jenkins.plugins.packer.PackerPublisher getRemotePackerExec
INFO: Using packer: null
Nov 28, 2015 7:47:21 AM biz.neustar.jenkins.plugins.packer.PackerPublisher perform
INFO: Using FileTemplate
Nov 28, 2015 7:47:21 AM biz.neustar.jenkins.plugins.packer.PackerPublisher getRemoteTemplate
INFO: Using templatePath: /var/lib/jenkins/workspace/amibuild/templates/rhel.template
Nov 28, 2015 7:47:21 AM biz.neustar.jenkins.plugins.packer.PackerPublisher perform
INFO: launch: build -debug /var/lib/jenkins/workspace/amibuild/templates/rhel.template
Nov 28, 2015 7:47:21 AM biz.neustar.jenkins.plugins.packer.PackerPublisher perform
SEVERE: java.io.IOException: Cannot run program "build" (in directory "/var/lib/jenkins/workspace/amibuild"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:815)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.Launcher$ProcStarter.join(Launcher.java:388)
at biz.neustar.jenkins.plugins.packer.PackerPublisher.perform(PackerPublisher.java:340)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 15 more
Job console output
Building in workspace /var/lib/jenkins/workspace/amibuild
[amibuild] $ /bin/sh -xe /tmp/hudson4748233576130177950.sh
+ export PACKER_LOG=1
+ PACKER_LOG=1
+ export PACKER_LOG_PATH=/var/log/packer.log
+ PACKER_LOG_PATH=/var/log/packer.log
[amibuild] $ build -debug /var/lib/jenkins/workspace/amibuild/templates/rhel.template
FATAL: Execution failed: build -debug /var/lib/jenkins/workspace/amibuild/templates/rhel.template
Finished: FAILURE
Build step 'Packer' marked build as failure
Finished: FAILURE