hashicorp / hashicorp/setup-packer

packer build exit error without any explanation in CI

Open
#81 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
HCL
Stars
165
Forks
88
PR merge metrics
No merged PRs in 30d

Description

Is it mandatory to have HCP_CLIENT_ID for the build to succeed? It builds fine in my laptop but not in the Github Action. Why?

# Expected Behavior

packer build should succeed.

## Current Behavior

```
+ packer init main.pkr.hcl
Installed plugin github.com/hashicorp/amazon v1.2.6 in "/home/runner/.config/packer/plugins/github.com/hashicorp/amazon/packer-plugin-amazon_v1.2.6_x5.0_linux_amd64"
+ packer build main.pkr.hcl
Error: Process completed with exit code 1.
```

## Steps to Reproduce

```
jobs:
packer:
runs-on: ubuntu-latest
name: Run Packer
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup `packer`
uses: hashicorp/setup-packer@main
with:
version: ${{ env.PACKER_VERSION }}

- name: Build Image
id: build
run: |
set -ex
packer init $IMAGE_NAME.pkr.hcl
packer build $IMAGE_NAME.pkr.hcl
```

## Environment

see above

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.