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

Publish new per target platform CI docker images #4461

Merged
merged 10 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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
19 changes: 14 additions & 5 deletions .github/workflows/ci-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,38 @@ name: "Build and Publish CI Containers to ACR"

on:
push:
branches:
- "ci_docker_image_variants" # TODO: Remove before merge
tags:
- "ccf_ci_image/*"

env:
ACR_REGISTRY: ccfmsrc.azurecr.io
ACR_TOKEN_NAME: ci-push-token
DOCKER_BUILDKIT: 1 # https://docs.docker.com/develop/develop-images/build_enhancements/

jobs:
build:
name: "Build and Publish SGX CI Containers"
name: "Build and Publish CI Containers"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Truncate ref
run: echo "tag=${GITHUB_REF#refs/tags/ccf_ci_image/}" >> $GITHUB_OUTPUT
run: echo "tag=temp-platform" >> $GITHUB_OUTPUT # "tag=${GITHUB_REF#refs/tags/ccf_ci_image/}" >> $GITHUB_OUTPUT TODO: Revert
id: tref

- name: Build CCF CI container
run: docker build -f docker/ccf_ci . -t $ACR_REGISTRY/ccf/ci/sgx:${{steps.tref.outputs.tag}}
- name: Build CCF CI sgx container
run: docker build -f docker/ccf_ci . --build-arg="platform=sgx" -t $ACR_REGISTRY/ccf/ci:${{steps.tref.outputs.tag}}-sgx

- name: Build CCF CI snp container
run: docker build -f docker/ccf_ci . --build-arg="platform=snp" -t $ACR_REGISTRY/ccf/ci:${{steps.tref.outputs.tag}}-snp

- name: Build CCF CI virtual container
run: docker build -f docker/ccf_ci . --build-arg="platform=virtual" -t $ACR_REGISTRY/ccf/ci:${{steps.tref.outputs.tag}}-virtual

- name: Log in
run: docker login -u $ACR_TOKEN_NAME -p ${{ secrets.ACR_CI_PUSH_TOKEN_PASSWORD }} $ACR_REGISTRY

- name: Push CI container
run: docker push $ACR_REGISTRY/ccf/ci/sgx:${{steps.tref.outputs.tag}}
run: docker push $ACR_REGISTRY/ccf/ci --all-tags
2 changes: 1 addition & 1 deletion cmake/cpack_settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set(OE_VERSION "0.18.2")
if(COMPILE_TARGET STREQUAL "sgx")
list(APPEND CCF_DEB_DEPENDENCIES "open-enclave (>=${OE_VERSION})")
else()
list(APPEND CCF_DEB_DEPENDENCIES "open-enclave-host-verify (>=${OE_VERSION})")
list(APPEND CCF_DEB_DEPENDENCIES "open-enclave-hostverify (>=${OE_VERSION})")
endif()

list(JOIN CCF_DEB_DEPENDENCIES ", " CPACK_DEBIAN_PACKAGE_DEPENDS)
Expand Down
8 changes: 8 additions & 0 deletions getting_started/setup_vm/ccf-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@
- import_role:
name: intel
tasks_from: sgx-psw.yml
when: platform == "sgx"
- import_role:
name: intel
tasks_from: sgx-group.yml
when: platform == "sgx"
- import_role:
name: az_dcap
tasks_from: install.yml
when: platform == "sgx"
- import_role:
name: openenclave
tasks_from: binary_install.yml
when: platform == "sgx"
- import_role:
name: openenclave
tasks_from: install_host_verify.yml
eddyashton marked this conversation as resolved.
Show resolved Hide resolved
when: platform != "sgx"
- import_role:
name: nodejs
tasks_from: install.yml
Expand Down