Skip to content

Commit

Permalink
ci: avoid apt install
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
  • Loading branch information
glimchb committed Jul 15, 2024
1 parent 243d889 commit f667929
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,18 @@ services:
'--log', 'level=20',
'--flags', 'not-need-init,startup-clear']

swtpm-test:
image: docker.io/strongx509/tpm:5.9.13
depends_on:
- swtpm
volumes:
- tpm-data:/swtpm
networks:
- opi
environment:
TPM2TOOLS_TCTI: swtpm:path=/swtpm/swtpm.sock
command: ['tpm2', 'clear']

volumes:
tpm-data:
server-certs:
Expand Down
4 changes: 1 addition & 3 deletions scripts/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ docker-compose exec -T client cat /var/lib/dhclient/dhclient.leases | grep sztp-
REDIRECT=$(docker-compose exec -T client cat /var/lib/dhclient/dhclient.leases | grep sztp-redirect-urls | head -n 1 | awk '{print $3}' | tr -d '";')

# tests TPM
docker-compose exec --rm -T swtpm apt update
docker-compose exec --rm -T swtpm apt install -y tpm2-tools
docker-compose exec --rm -T -e TPM2TOOLS_TCTI="swtpm:path=/swtpm/swtpm.sock" swtpm tpm2 clear
docker run --rm T -v sztp_tpm-data:/swtpm -e TPM2TOOLS_TCTI="swtpm:path=/swtpm/swtpm.sock" docker.io/strongx509/tpm:5.9.13 tpm2 clear

# reusable variables
CERTIFICATES=(--key /certs/third_private_key.pem --cert /certs/third_my_cert.pem --cacert /certs/opi.pem)
Expand Down

0 comments on commit f667929

Please sign in to comment.