Hi Yannis Lionis

*See initial question is correct ...not able to build packer template on 
jenkins ..then quetion deviated and author also some where deviated*
*Thanks*

*--Gopi*On Tuesday, July 7, 2015 at 2:19:53 PM UTC+5:30, Yannis Lionis 
wrote:
>
> Thanks both - I got to the bottom of this...
>
> The build itself was failing due to AWS credentials (which I was aware 
> of). Once I fixed that, the console output actually started to appear. If 
> there is a failure further along everything is displayed correctly in the 
> console log, but for some reason the authentication error does not. Oh well.
>
> Yannis
>
> On Thursday, 2 July 2015 22:46:41 UTC+1, Piotr Mitoraj wrote:
>>
>> Hi
>>
>> This is what I do in 'execute shell' build step before I run packer:
>> export PACKER_LOG=1
>> export PACKER_LOG_PATH=$WORKSPACE/packer.log
>> echo "packer log path:" $PACKER_LOG_PATH
>>
>> I think though that you should be able to see the packer output anyway.
>>
>> As for the second issue I never actually experienced a green build 
>> despite packer failure. I am not using any packer jenkins plugin.
>>
>> Below sample Console Output from Jenkins build
>> ..checking out code..
>>
>> [packer-base_build_vmware] $ /bin/sh /tmp/hudson7245981517662937540.sh
>> packer log path: /home/jenkins/workspace/packer-base_build_vmware/packer.log
>> /opt/packer/packer build -only=vmware-iso -force -var 
>> vmx_template=/home/jenkins/workspace/packer-base_build_vmware/packer_conf/template.vmx
>>  
>> -var-file=/home/jenkins/workspace/packer-base_build_vmware/packer_conf/vmware_vars.json
>>  /home/jenkins/workspace/packer-base_build_vmware/packer_conf/packer_vm.json
>>  [1;32mvmware-iso output will be in this color. [0m
>>
>>  [1;32mWarnings for build 'vmware-iso':
>>  [0m
>>  [1;32m* A checksum type of 'none' was specified. Since ISO files are so big,
>> a checksum is highly recommended. [0m
>>  [1;32m [0m
>>  [1;32m==> vmware-iso: Downloading or copying ISO [0m
>>  [0;32m    vmware-iso: Downloading or copying: 
>> file:///opt/packer/rhel-server-6.6-x86_64-boot.iso [0m
>>  [1;32m==> vmware-iso: Deleting previous output directory... [0m
>>  [1;32m==> vmware-iso: Uploading ISO to remote machine... [0m
>>  [1;32m==> vmware-iso: Creating virtual machine disk [0m
>>  [1;32m==> vmware-iso: Building and writing VMX file [0m
>>  [1;32m==> vmware-iso: Starting HTTP server on port 8069 [0m
>>  [1;32m==> vmware-iso: Registering remote VM... [0m
>>  [1;32m==> vmware-iso: Starting virtual machine... [0m
>>  [1;32m==> vmware-iso: Waiting 5s for boot... [0m
>>  [1;32m==> vmware-iso: Connecting to VM via VNC [0m
>>
>> ...
>>
>> Here I found the failed log when disk could not be created because I ran 
>> out of disk space, packer failed and build was red:
>>
>> packer-base_build_vmware] $ /bin/sh /tmp/hudson8243131398042465789.sh
>> packer log path: /home/jenkins/workspace/packer-base_build_vmware/packer.log
>> /opt/packer/packer build -only=vmware-iso -force -var 
>> vmx_template=/home/jenkins/workspace/packer-base_build_vmware/packer_conf/template.vmx
>>  
>> -var-file=/home/jenkins/workspace/packer-base_build_vmware/packer_conf/vmware_vars.json
>>  /home/jenkins/workspace/packer-base_build_vmware/packer_conf/packer_vm.json
>>  [1;32mvmware-iso output will be in this color. [0m
>>
>>  [1;32mWarnings for build 'vmware-iso':
>>  [0m
>>  [1;32m* A checksum type of 'none' was specified. Since ISO files are so big,
>> a checksum is highly recommended. [0m
>>  [1;32m [0m
>>  [1;32m==> vmware-iso: Downloading or copying ISO [0m
>>  [0;32m    vmware-iso: Downloading or copying: 
>> file:///opt/packer/rhel-server-6.6-x86_64-boot.iso [0m
>>  [1;32m==> vmware-iso: Uploading ISO to remote machine... [0m
>>  [1;32m==> vmware-iso: Creating virtual machine disk [0m
>>  [1;31m==> vmware-iso: Error creating disk: 'vmkfstools -c 100000M -d 
>> zeroedthick -a lsilogic /vmfs/volumes/packer.io/packer_base/disk.vmdk'
>> ==> vmware-iso: 
>> ==> vmware-iso: Stdout: 
>> ==> vmware-iso: 
>> ==> vmware-iso: Stderr: Failed to create virtual disk: There is not enough 
>> space on the file system for the selected operation (13).
>> ==> vmware-iso: [0m
>>  [1;32m==> vmware-iso: Deleting output directory... [0m
>>  [1;31mBuild 'vmware-iso' errored: Error creating disk: 'vmkfstools -c 
>> 100000M -d zeroedthick -a lsilogic 
>> /vmfs/volumes/packer.io/packer_base/disk.vmdk'
>>
>> Stdout: 
>>
>> Stderr: Failed to create virtual disk: There is not enough space on the file 
>> system for the selected operation (13).
>>  [0m
>>
>> ==> Some builds didn't complete successfully and had errors:
>> --> vmware-iso: Error creating disk: 'vmkfstools -c 100000M -d zeroedthick 
>> -a lsilogic /vmfs/volumes/packer.io/packer_base/disk.vmdk'
>>
>> Stdout: 
>>
>> Stderr: Failed to create virtual disk: There is not enough space on the file 
>> system for the selected operation (13).
>>
>>
>> ==> Builds finished but no artifacts were created.
>> Build step 'Execute shell' marked build as failure
>> Skipped archiving because build is not successful
>> Warning: you have no plugins providing access control for builds, so falling 
>> back to legacy behavior of permitting any downstream builds to be triggered
>> Notifying upstream projects of job completion
>> Finished: FAILURE
>>
>>
>> Regards
>> Piotr
>>
>> On Thu, Jul 2, 2015 at 12:22 PM, Yannis Lionis <[email protected]> 
>> wrote:
>>
>>> I'm running packer in a Jenkins build by executing "packer build 
>>> template.file" in a Shell build step.
>>>
>>> My problem is that the output of the command that appears when I execute 
>>> this in my dev environment is nowhere to be found. Instead, the Jenkins 
>>> build console contains this:
>>>
>>> + packer build template.file
>>> 0 0
>>> Finished: SUCCESS
>>>
>>>
>>> On top of it, the packer build actually fails, but the Jenkins build 
>>> shows successful.
>>>
>>> I subsequently discovered the Packer Jenkins plugin and installed it. 
>>> Same issue, the output in the Jenkins console does not contain the 
>>> information displayed when I execute manually, it looks lie this:
>>>
>>> $ /var/lib/jenkins/packer/packer build 
>>> /var/lib/jenkins/workspace/template.file
>>> FATAL: Execution failed: /var/lib/jenkins/packer/packer build 
>>> /var/lib/jenkins/workspace/template.fileFinished 
>>> <http://stacktrace.jenkins-ci.org/search?query=Finished>: FAILURE
>>> Build step 'Packer' marked build as failure
>>> Finished: FAILURE
>>>
>>>
>>> Any ideas?
>>>
>>> Yannis
>>>
>>>
>>> -- 
>>> This mailing list is governed under the HashiCorp Community Guidelines - 
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in 
>>> violation of those guidelines may result in your removal from this mailing 
>>> list.
>>>  
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/packer-tool/a65f3c6d-69ea-43df-bdad-421b97076de4%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/packer-tool/a65f3c6d-69ea-43df-bdad-421b97076de4%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/38c208a5-eebf-4814-8a2a-176bd1f2da70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to