Skip to content

Commit

Permalink
chore: Adding init commands
Browse files Browse the repository at this point in the history
  • Loading branch information
nietzscheson committed Jul 24, 2024
1 parent 184caca commit 24862d4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ jobs:
- name: Install custom nix env
if: steps.myCacheStep.outputs.cache-hit != 'true'
run: nix-env -f shell.nix -i '.*'
- name: Packer Init
run: nix-shell --run "task packer.init"
- name: Packer Format
run: nix-shell --run "task packer.format"
- name: Packer Validate
run: nix-shell --run "task packer.validate"
- name: Packer Build
run: nix-shell --run "task packer.build"
- name: Terraform Init
run: nix-shell --run "task terraform.init"
- name: Terraform Format
run: nix-shell --run "task terraform.format"
- name: Terraform Validate
Expand Down
16 changes: 14 additions & 2 deletions taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ tasks:
cmds:
- echo "Getting AWS STS credentials..."
- aws sts get-caller-identity

packer.init:
desc: Initialize Packer
cmds:
- echo "Initializing Packer..."
- packer init -upgrade packer.pkr.hcl
dir: ./packer
packer.format:
desc: Format the Packer Template
dir: ./packer
Expand All @@ -26,7 +31,7 @@ tasks:
dir: ./packer
cmds:
- echo "Building Packer image..."
- packer build packer.pkr.hcls
- packer build packer.pkr.hcl

ansible.check:
desc: Check the Ansible Playbook
Expand All @@ -35,6 +40,13 @@ tasks:
- echo "Checking Ansible playbook..."
- ansible-playbook --check playbook.yml

terraform.init:
desc: Initialize Terraform
dir: ./terraform
cmds:
- echo "Initializing Terraform..."
- terraform init

terraform.format:
desc: Format the Terraform Code
dir: ./terraform
Expand Down

0 comments on commit 24862d4

Please sign in to comment.