Skip to content

Commit

Permalink
Add tasks to install Packer plugins
Browse files Browse the repository at this point in the history
These tasks must take place before packer build is run.
  • Loading branch information
jsf9k committed Sep 15, 2023
1 parent ce7c7e0 commit 0a999dc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ jobs:
pip install --upgrade --requirement requirements-test.txt
- name: Install Ansible roles
run: ansible-galaxy install --force --role-file src/requirements.yml
# 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
- name: Set up pre-commit hook environments
run: pre-commit install-hooks
- name: Run pre-commit on all files
Expand Down Expand Up @@ -225,6 +229,8 @@ jobs:
sudo mv /usr/bin/python3 /usr/bin/python3-default
sudo ln -s ${{ env.pythonLocation }}/bin/python3 \
/usr/bin/python3
- name: Install Packer plugins
run: packer init src/packer.pkr.hcl
- name: Create machine image
# This runs through the AMI creation process but does not
# actually create an AMI
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ jobs:
sudo mv /usr/bin/python3 /usr/bin/python3-default
sudo ln -s ${{ env.pythonLocation }}/bin/python3 \
/usr/bin/python3
- name: Install Packer plugins
run: packer init src/packer.pkr.hcl
- name: Create machine image
env:
GITHUB_IS_PRERELEASE: ${{ github.event.release.prerelease }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ jobs:
sudo mv /usr/bin/python3 /usr/bin/python3-default
sudo ln -s ${{ env.pythonLocation }}/bin/python3 \
/usr/bin/python3
- name: Install Packer plugins
run: packer init src/packer.pkr.hcl
- name: Create machine image
run: |
packer build -timestamp-ui \
Expand Down

0 comments on commit 0a999dc

Please sign in to comment.