Skip to content

Commit

Permalink
docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Gennady Potapov committed Apr 8, 2019
1 parent 3708634 commit 403c789
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
7 changes: 6 additions & 1 deletion .kitchen.dokken.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,9 @@ platforms:
- name: ubuntu-16.04
driver:
image: dokken/ubuntu-16.04
pid_one_command: /bin/systemd
pid_one_command: /bin/systemd

- name: ubuntu-18.04
driver:
image: dokken/ubuntu-18.04
pid_one_command: /bin/systemd
11 changes: 2 additions & 9 deletions libraries/agent_installer_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,13 @@ def verify_installer(args)
}

code_linux =<<-'EOC'
gpg --import "$GPG_FILE" 2>&1
key="$(gpg --with-colons --import-options import-show --dry-run --import "$GPG_FILE" | grep '^fpr' | cut -d':' -f10)"
fingerprint="$(gpg --with-colons --import-options import-show --import "$GPG_FILE" | grep '^fpr' | cut -d':' -f10)"
test $? -ne 0 &&\
echo 'ERROR: could not retrieve key from gpg file' &&\
exit 1
fingerprint="$(gpg --fingerprint $key | grep 'Key fingerprint' | sed 's/\s*Key fingerprint = //g' | tr -d ' ')"
test $? -ne 0 &&\
echo "ERROR: could not retrieve fingerprint from key '$key'" &&\
exit 1
test "$fingerprint" != "$EXPECTED_FINGERPRINT" &&\
echo "ERROR: fingerprint '$fingerprint' for key '$key' does not match the expected: '$EXPECTED_FINGERPRINT'" &&\
echo "ERROR: fingerprint '$fingerprint' does not match the expected: '$EXPECTED_FINGERPRINT'" &&\
exit 1
res="$(gpg --verify "$SIG_FILE" "$PACKAGE_FILE" 2>&1)"
Expand Down

0 comments on commit 403c789

Please sign in to comment.