Skip to content

Commit

Permalink
ci: add validation per Packer template file individually
Browse files Browse the repository at this point in the history
  • Loading branch information
UlisesGascon committed Aug 31, 2024
1 parent 9024f76 commit 17fcb3f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/orka-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ jobs:
SSH_TEST_PASSWORD: 'mock-ssh-test-password'
SSH_TEST_PUBLIC_KEY: 'mock-ssh-test-public-key'
run: |
packer validate -var "orka_endpoint=$ORKA_ENDPOINT" \
-var "orka_auth_token=$ORKA_AUTH_TOKEN" \
-var "ssh_default_username=$SSH_DEFAULT_USERNAME" \
-var "ssh_default_password=$SSH_DEFAULT_PASSWORD" \
-var "ssh_test_public_key=$SSH_TEST_PASSWORD" \
-var "ssh_userssh_test_passwordname=$SSH_TEST_PUBLIC_KEY" .
for file in $(find . -name '*.pkr.hcl'); do
echo "Validating $file"
packer validate -var "orka_endpoint=$ORKA_ENDPOINT" \
-var "orka_auth_token=$ORKA_AUTH_TOKEN" \
-var "ssh_default_username=$SSH_DEFAULT_USERNAME" \
-var "ssh_default_password=$SSH_DEFAULT_PASSWORD" \
-var "ssh_test_public_key=$SSH_TEST_PASSWORD" \
-var "ssh_userssh_test_passwordname=$SSH_TEST_PUBLIC_KEY" $file || exit 1
done
working-directory: orka/templates

0 comments on commit 17fcb3f

Please sign in to comment.