Skip to content

Commit

Permalink
Simplify packer init command
Browse files Browse the repository at this point in the history
Co-authored-by: Nicholas McDonnell <[email protected]>
  • Loading branch information
jsf9k and mcdonnnj committed Sep 15, 2023
1 parent c37df07 commit 1595315
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
# This must happen before pre-commit is run or the Packer format
# linter will throw an error.
- name: Install Packer plugins
run: packer init src/packer.pkr.hcl
run: packer init src
- name: Set up pre-commit hook environments
run: pre-commit install-hooks
- name: Run pre-commit on all files
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
sudo ln -s ${{ env.pythonLocation }}/bin/python3 \
/usr/bin/python3
- name: Install Packer plugins
run: packer init src/packer.pkr.hcl
run: packer init src
- name: Create machine image
# This runs through the AMI creation process but does not
# actually create an AMI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
sudo ln -s ${{ env.pythonLocation }}/bin/python3 \
/usr/bin/python3
- name: Install Packer plugins
run: packer init src/packer.pkr.hcl
run: packer init src
- name: Create machine image
env:
GITHUB_IS_PRERELEASE: ${{ github.event.release.prerelease }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
sudo ln -s ${{ env.pythonLocation }}/bin/python3 \
/usr/bin/python3
- name: Install Packer plugins
run: packer init src/packer.pkr.hcl
run: packer init src
- name: Create machine image
run: |
packer build -timestamp-ui \
Expand Down
6 changes: 1 addition & 5 deletions setup-env
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,7 @@ for req_file in "requirements-dev.txt" "requirements-test.txt" "requirements.txt
done

# Install Packer plugin dependencies
for packer_template_file in src/*.pkr.hcl; do
if [[ -f src/packer.pkr.hcl ]]; then
packer init -upgrade "$packer_template_file"
fi
done
packer init -upgrade src

# Install git pre-commit hooks now or later.
pre-commit install ${INSTALL_HOOKS:+"--install-hooks"}
Expand Down

0 comments on commit 1595315

Please sign in to comment.