Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat cckbc #146

Merged
merged 4 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@ jobs:
include:
- runner: sgx-ecc
sgx_mode: HW
kbc: eaa-kbc
- runner: sgx-ecc
sgx_mode: HW
kbc: cc-kbc
- runner: ubuntu-22.04
sgx_mode: SIM
kbc: sample-kbc

name: SGX_MODE=${{ matrix.sgx_mode }}
name: SGX_MODE=${{ matrix.sgx_mode }} KBC=${{ matrix.kbc }}
runs-on: ${{ matrix.runner }}
env:
SGX_MODE: ${{ matrix.sgx_mode }}
KBC: ${{ matrix.kbc }}
PAYLOAD_ARTIFACTS: ${{ github.workspace }}/coco

steps:
Expand Down Expand Up @@ -81,7 +87,7 @@ jobs:
- name: Build agent-enclave bundle
run: |
mkdir $PAYLOAD_ARTIFACTS
docker build . -f tools/packaging/build/agent-enclave-bundle/Dockerfile --build-arg SGX_MODE=${SGX_MODE} -t agent-instance:build
docker build . -f tools/packaging/build/agent-enclave-bundle/Dockerfile --build-arg SGX_MODE=${SGX_MODE} --build-arg KBC=${KBC} -t agent-instance:build
docker export $(docker create agent-instance:build) | tee > ${PAYLOAD_ARTIFACTS}/agent-instance.tar
working-directory: ${{ github.workspace }}/src/github.com/confidential-containers/enclave-cc

Expand All @@ -108,7 +114,7 @@ jobs:
- name: Install decrypt_config.conf and ocicrypt.conf for agent-enclave bundle
run: |
sudo install -D -t $PAYLOAD_ARTIFACTS/opt/confidential-containers/share/enclave-cc-agent-instance/rootfs/configs ocicrypt.conf
sudo install decrypt_config-$SGX_MODE.conf $PAYLOAD_ARTIFACTS/opt/confidential-containers/share/enclave-cc-agent-instance/rootfs/configs/decrypt_config.conf
sudo install decrypt_config-$SGX_MODE-$KBC.conf $PAYLOAD_ARTIFACTS/opt/confidential-containers/share/enclave-cc-agent-instance/rootfs/configs/decrypt_config.conf
working-directory: ${{ github.workspace }}/src/github.com/confidential-containers/enclave-cc/test/e2e

- name: Test image pull and unpack
Expand All @@ -126,7 +132,7 @@ jobs:
- name: Test image decryption
run: |
SANDBOX_ID=$(sudo crictl runp --runtime enclavecc sandbox.json)
CONTAINER_ID=$(sudo crictl create --with-pull $SANDBOX_ID hello-world-encrypted-$SGX_MODE.json sandbox.json)
CONTAINER_ID=$(sudo crictl create --with-pull $SANDBOX_ID hello-world-encrypted-$SGX_MODE-$KBC.json sandbox.json)
sudo crictl start $CONTAINER_ID
sleep 5
sudo crictl logs $CONTAINER_ID
Expand Down
Loading