Skip to content

Commit

Permalink
packaging: Add se artifacts to main
Browse files Browse the repository at this point in the history
This is to add artifacts for IBM Z SE(TEE) to main.

Fixes: #6754

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
  • Loading branch information
BbolroC committed May 22, 2023
1 parent a2e69c5 commit 278ab7f
Show file tree
Hide file tree
Showing 11 changed files with 937 additions and 16 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-kata-static-tarball-s390x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- qemu
- rootfs-image
- rootfs-initrd
- boot-image-se
- shim-v2
- virtiofsd
steps:
Expand All @@ -39,6 +40,14 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0 # This is needed in order to keep the commit ids history

- name: Place a host key document
run: |
mkdir -p "host-key-document"
cp "${CI_HKD_PATH}" "host-key-document"
env:
CI_HKD_PATH: ${{ secrets.CI_HKD_PATH }}

- name: Build ${{ matrix.asset }}
run: |
make "${KATA_ASSET}-tarball"
Expand All @@ -50,6 +59,7 @@ jobs:
KATA_ASSET: ${{ matrix.asset }}
TAR_OUTPUT: ${{ matrix.asset }}.tar.gz
PUSH_TO_REGISTRY: ${{ inputs.push-to-registry }}
HKD_PATH: "host-key-document"

- name: store-artifact ${{ matrix.asset }}
uses: actions/upload-artifact@v3
Expand Down
21 changes: 21 additions & 0 deletions ci/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,24 @@ run_get_pr_changed_file_details()
source "$tests_repo_dir/.ci/lib.sh"
get_pr_changed_file_details
}

# Check if the 1st argument version is greater than and equal to 2nd one
# Version format: [0-9]+ separated by period (e.g. 2.4.6, 1.11.3 and etc.)
#
# Parameters:
# $1 - a version to be tested
# $2 - a target version
#
# Return:
# 0 if $1 is greater than and equal to $2
# 1 otherwise
version_greater_than_equal() {
local current_version=$1
local target_version=$2
smaller_version=$(echo -e "$current_version\n$target_version" | sort -V | head -1)
if [ "${smaller_version}" = "${target_version}" ]; then
return 0
else
return 1
fi
}
16 changes: 16 additions & 0 deletions src/runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ GENERATED_VARS = \
CONFIG_QEMU_SNP_IN \
CONFIG_CLH_IN \
CONFIG_FC_IN \
CONFIG_QEMU_SE_IN \
$(USER_VARS)
SCRIPTS += $(COLLECT_SCRIPT)
SCRIPTS_DIR := $(BINDIR)
Expand Down Expand Up @@ -329,6 +330,18 @@ ifneq (,$(QEMUCMD))

CONFIGS += $(CONFIG_QEMU_NVIDIA_GPU)

CONFIG_FILE_QEMU_SE = configuration-qemu-se.toml
CONFIG_QEMU_SE = config/$(CONFIG_FILE_QEMU_SE)
CONFIG_QEMU_SE_IN = $(CONFIG_QEMU_SE).in

CONFIG_PATH_QEMU_SE = $(abspath $(CONFDIR)/$(CONFIG_FILE_QEMU_SE))
CONFIG_PATHS += $(CONFIG_PATH_QEMU_SE)

SYSCONFIG_QEMU_SE = $(abspath $(SYSCONFDIR)/$(CONFIG_FILE_QEMU_SE))
SYSCONFIG_PATHS += $(SYSCONFIG_QEMU_SE)

CONFIGS += $(CONFIG_QEMU_SE)

# qemu-specific options (all should be suffixed by "_QEMU")
DEFBLOCKSTORAGEDRIVER_QEMU := virtio-scsi
DEFBLOCKDEVICEAIO_QEMU := io_uring
Expand All @@ -350,6 +363,8 @@ ifneq (,$(QEMUCMD))
KERNELSNPNAME = $(call MAKE_KERNEL_SNP_NAME,$(KERNELSNPTYPE))
KERNELSNPPATH = $(KERNELDIR)/$(KERNELSNPNAME)

KERNELSENAME = kata-containers-secure.img
KERNELSEPATH = $(KERNELDIR)/$(KERNELSENAME)
endif

ifneq (,$(CLHCMD))
Expand Down Expand Up @@ -510,6 +525,7 @@ USER_VARS += KERNELPATH
USER_VARS += KERNELSEVPATH
USER_VARS += KERNELTDXPATH
USER_VARS += KERNELSNPPATH
USER_VARS += KERNELSEPATH
USER_VARS += KERNELPATH_CLH
USER_VARS += KERNELPATH_FC
USER_VARS += KERNELVIRTIOFSPATH
Expand Down

0 comments on commit 278ab7f

Please sign in to comment.