actions: enable arm64 images for operator #294
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: enclave-cc e2e tests | |
on: | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
e2e: | |
name: operator enclave-cc e2e tests | |
runs-on: ubuntu-22.04 | |
services: | |
registry: | |
image: registry:2 | |
options: --name registry | |
ports: | |
- 5000:5000 | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3 | |
with: | |
driver-opts: network=host | |
- name: Build and push the operator image to local registry | |
run: | | |
make docker-build | |
make docker-push | |
env: | |
IMG: localhost:5000/cc-operator:latest | |
- name: Build and push the pre-install to local registry | |
run: | | |
pushd install/pre-install-payload | |
make reqs-image registry="${REGISTRY}" extra_docker_manifest_flags="--insecure" | |
popd | |
env: | |
REGISTRY: localhost:5000/reqs-payload | |
- name: Setup kind cluster | |
run: | | |
kind create cluster --image "kindest/node:v1.31.0@sha256:53df588e04085fd41ae12de0c3fe4c72f7013bba32a20e7325357a1ac94ba865" -n coco-sgx --config tests/e2e/enclave-cc-kind-config.yaml --wait 120s | |
kubectl label node coco-sgx-worker node.kubernetes.io/worker= | |
docker network connect kind registry | |
- name: Deploy operator from the local registry | |
run: | | |
cd config/default | |
kustomize edit set image quay.io/confidential-containers/operator=localhost:5000/cc-operator:latest | |
kubectl apply -k . | |
sleep 1 | |
kubectl wait --for=jsonpath='{.status.conditions[0].status}'=True deployments/cc-operator-controller-manager -n confidential-containers-system | |
img=$(kubectl get deployments/cc-operator-controller-manager -n confidential-containers-system -o jsonpath='{.spec.template.spec.containers[?(@.name == "manager")].image}') | |
[ "${img}" = "localhost:5000/cc-operator:latest" ] | |
- name: Install enclave-cc sim | |
run: | | |
cd config/samples/enclave-cc/sim | |
kustomize edit set image quay.io/confidential-containers/reqs-payload=localhost:5000/reqs-payload:latest | |
kubectl apply -k . | |
sleep 1 | |
kubectl wait --for=jsonpath='{.status.runtimeClass}'=enclave-cc ccruntime/ccruntime-enclave-cc-sgx-mode-sim --timeout=90s | |
- name: Deploy sample workload | |
run: | | |
kubectl apply -f tests/e2e/enclave-cc-pod-sim.yaml | |
kubectl wait --for=condition=Ready pod/enclave-cc-pod-sim |