Hi,
I create a pipeline for Centos OS image creation and using hashicorp packer, we are creating AMI’s in AWS.
the same step is working in Jenkins but it is failing in Drone, it is the post processor step where packer calling JQ binary and manifest.json file.
find the Packer.json:
“post-processors”: [
{
“type”: “manifest”,
“output”: “manifest.json”,
“strip_path”: true
},
{
“inline”: [
“jq “.” manifest.json”
],
“type”: “shell-local”
},
Error:-1:
=> amazon-ebs: Pausing before cleanup of step ‘StepSourceAMIInfo’. Press enter to continue. ==> amazon-ebs: Pausing before cleanup of step ‘StepPreValidate’. Press enter to continue. ==> amazon-ebs: Running post-processor: manifest
==> amazon-ebs: Running post-processor: shell-local
==> amazon-ebs (shell-local): Post processing with local shell script: /tmp/packer-shell896811396
amazon-ebs (shell-local): /tmp/packer-shell896811396: 2: /tmp/packer-shell896811396: jq: not found
==> amazon-ebs: Running post-processor: amazon-ami-management
amazon-ebs (amazon-ami-management): Deleting image: ami-d59364a8
==> amazon-ebs: Running post-processor: amazon-ami-management
amazon-ebs (amazon-ami-management): Deleting image: ami-e545ce9d
==> amazon-ebs: Running post-processor: amazon-ami-management
amazon-ebs (amazon-ami-management): Deleting image: ami-a298dfdb
Build ‘amazon-ebs’ errored: 1 error(s) occurred:
- Post-processor failed: Erroneous exit code 127 while executing script: /tmp/packer-shell896811396
Please see output above for more information.
==> Some builds didn’t complete successfully and had errors:
–> amazon-ebs: 1 error(s) occurred:
- Post-processor failed: Erroneous exit code 127 while executing script: /tmp/packer-shell896811396
Please see output above for more information.
==> Builds finished but no artifacts were created.
make[1]: *** [build] Error 1
Makefile:52: recipe for target ‘build’ failed
make[1]: Leaving directory '
Makefile:92: recipe for target ‘build-jenkins’ failed
make: *** [build-jenkins] Error 2