Skip to content

Commit

Permalink
Merge pull request #130 from microsoft/sprt/sync-upstream-1223
Browse files Browse the repository at this point in the history
Test PR
  • Loading branch information
sprt authored Dec 20, 2023
2 parents 1f96bd6 + b1c8818 commit e38682a
Show file tree
Hide file tree
Showing 265 changed files with 17,383 additions and 2,898 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/basic-ci-amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
containerd_version: ['lts', 'active']
vmm: ['clh', 'qemu', 'stratovirt']
vmm: ['clh', 'dragonball', 'qemu', 'stratovirt']
runs-on: garm-ubuntu-2204-smaller
env:
CONTAINERD_VERSION: ${{ matrix.containerd_version }}
Expand Down Expand Up @@ -53,14 +53,15 @@ jobs:
run: bash tests/integration/cri-containerd/gha-run.sh install-kata kata-artifacts

- name: Run cri-containerd tests
timeout-minutes: 10
run: bash tests/integration/cri-containerd/gha-run.sh run

run-containerd-stability:
strategy:
fail-fast: false
matrix:
containerd_version: ['lts', 'active']
vmm: ['clh', 'qemu', 'stratovirt']
vmm: ['clh', 'cloud-hypervisor', 'dragonball', 'qemu', 'stratovirt']
runs-on: garm-ubuntu-2204-smaller
env:
CONTAINERD_VERSION: ${{ matrix.containerd_version }}
Expand Down Expand Up @@ -91,6 +92,7 @@ jobs:
run: bash tests/stability/gha-run.sh install-kata kata-artifacts

- name: Run containerd-stability tests
timeout-minutes: 15
run: bash tests/stability/gha-run.sh run

run-nydus:
Expand Down Expand Up @@ -132,6 +134,7 @@ jobs:
run: bash tests/integration/nydus/gha-run.sh install-kata kata-artifacts

- name: Run nydus tests
timeout-minutes: 10
run: bash tests/integration/nydus/gha-run.sh run

run-runk:
Expand Down Expand Up @@ -162,7 +165,8 @@ jobs:
- name: Install kata
run: bash tests/integration/runk/gha-run.sh install-kata kata-artifacts

- name: Run tracing tests
- name: Run runk tests
timeout-minutes: 10
run: bash tests/integration/runk/gha-run.sh run

run-tracing:
Expand Down Expand Up @@ -200,6 +204,7 @@ jobs:
run: bash tests/functional/tracing/gha-run.sh install-kata kata-artifacts

- name: Run tracing tests
timeout-minutes: 15
run: bash tests/functional/tracing/gha-run.sh run

run-vfio:
Expand Down Expand Up @@ -288,6 +293,7 @@ jobs:
- clh
- dragonball
- qemu
- cloud-hypervisor
runs-on: garm-ubuntu-2304-smaller
env:
KATA_HYPERVISOR: ${{ matrix.vmm }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-kata-static-tarball-amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- kernel-nvidia-gpu
- kernel-nvidia-gpu-snp
- kernel-nvidia-gpu-tdx-experimental
- log-parser-rs
- nydus
- ovmf
- ovmf-sev
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-kata-static-tarball-ppc64le.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
with:
ref: ${{ inputs.commit-hash }}
fetch-depth: 0 # This is needed in order to keep the commit ids history

- name: Prepare the self-hosted runner
run: ${HOME}/scripts/prepare_runner.sh

- name: Rebase atop of the latest target branch
run: |
Expand Down
54 changes: 48 additions & 6 deletions .github/workflows/build-kata-static-tarball-s390x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ jobs:
stage:
- ${{ inputs.stage }}
steps:
- name: Adjust a permission for repo
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
- name: Take a pre-action for self-hosted runner
run: ${HOME}/script/pre_action.sh ubuntu-2204

- name: Login to Kata Containers quay.io
if: ${{ inputs.push-to-registry == 'yes' }}
Expand Down Expand Up @@ -83,13 +82,56 @@ jobs:
retention-days: 15
if-no-files-found: error

create-kata-tarball:
build-asset-boot-image-se:
runs-on: s390x
needs: build-asset
steps:
- name: Adjust a permission for repo
- name: Take a pre-action for self-hosted runner
run: ${HOME}/script/pre_action.sh ubuntu-2204

- uses: actions/checkout@v3

- name: get-artifacts
uses: actions/download-artifact@v3
with:
name: kata-artifacts-s390x${{ inputs.tarball-suffix }}
path: kata-artifacts

- 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 boot-image-se
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
base_dir=tools/packaging/kata-deploy/local-build/
cp -r kata-artifacts ${base_dir}/build
# Skip building dependant artifacts of boot-image-se-tarball
# because we already have them from the previous build
sed -i 's/\(^boot-image-se-tarball:\).*/\1/g' ${base_dir}/Makefile
make boot-image-se-tarball
build_dir=$(readlink -f build)
sudo cp -r "${build_dir}" "kata-build"
sudo chown -R $(id -u):$(id -g) "kata-build"
env:
HKD_PATH: "host-key-document"

- name: store-artifact boot-image-se
uses: actions/upload-artifact@v3
with:
name: kata-artifacts-s390x${{ inputs.tarball-suffix }}
path: kata-build/kata-static-boot-image-se.tar.xz
retention-days: 1
if-no-files-found: error

create-kata-tarball:
runs-on: s390x
needs: [build-asset, build-asset-boot-image-se]
steps:
- name: Take a pre-action for self-hosted runner
run: ${HOME}/script/pre_action.sh ubuntu-2204

- uses: actions/checkout@v4
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/cargo-deny-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- edited
- reopened
- synchronize
paths-ignore: [ '**.md', '**.png', '**.jpg', '**.jpeg', '**.svg', '/docs/**' ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/ci-nightly-s390x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ jobs:
k8s-cri-containerd-rhel9-e2e-tests:
runs-on: s390x-rhel9
steps:
- name: Delete the existing files
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
sudo rm -rf $GITHUB_WORKSPACE/*
- name: Take a pre-action for self-hosted runner
run: |
${HOME}/script/pre_action.sh rhel9-nightly
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci-on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ on:
- synchronize
- reopened
- labeled
paths-ignore:
- 'docs/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
tarball-suffix: -${{ inputs.tag }}
commit-hash: ${{ inputs.commit-hash }}
target-branch: ${{ inputs.target-branch }}
secrets: inherit

build-kata-static-tarball-ppc64le:
uses: ./.github/workflows/build-kata-static-tarball-ppc64le.yaml
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/darwin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
- edited
- reopened
- synchronize
paths-ignore: [ '**.md', '**.png', '**.jpg', '**.jpeg', '**.svg', '/docs/**' ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/publish-kata-deploy-payload-ppc64le.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jobs:
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
- name: Prepare the self-hosted runner
run: ${HOME}/scripts/prepare_runner.sh

- uses: actions/checkout@v4
with:
ref: ${{ inputs.commit-hash }}
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/publish-kata-deploy-payload-s390x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ jobs:
kata-payload:
runs-on: s390x
steps:
- name: Adjust a permission for repo
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
- name: Take a pre-action for self-hosted runner
run: ${HOME}/script/pre_action.sh ubuntu-2204

- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-s390x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
uses: ./.github/workflows/build-kata-static-tarball-s390x.yaml
with:
stage: release
secrets: inherit

kata-deploy:
needs: build-kata-static-tarball-s390x
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-cri-containerd-tests-ppc64le.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ jobs:

- name: Run cri-containerd tests
run: bash tests/integration/cri-containerd/gha-run.sh run

- name: Cleanup actions for the self hosted runner
run: ${HOME}/scripts/cleanup_runner.sh
3 changes: 0 additions & 3 deletions .github/workflows/run-cri-containerd-tests-s390x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ jobs:
GOPATH: ${{ github.workspace }}
KATA_HYPERVISOR: ${{ matrix.vmm }}
steps:
- name: Adjust a permission for repo
run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE

- name: Take a pre-action for self-hosted runner
run: ${HOME}/script/pre_action.sh ubuntu-2204

Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/run-k8s-tests-on-aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ jobs:
strategy:
fail-fast: false
matrix:
rust-runtime:
- false
host_os:
- ubuntu
vmm:
Expand All @@ -42,8 +40,6 @@ jobs:
include:
- host_os: cbl-mariner
vmm: clh
- dragonball:
rust-runtime: true
runs-on: ubuntu-latest
env:
DOCKER_REGISTRY: ${{ inputs.registry }}
Expand All @@ -55,7 +51,6 @@ jobs:
KUBERNETES: "vanilla"
USING_NFD: "false"
K8S_TEST_HOST_TYPE: ${{ matrix.instance-type }}
RUST_RUNTIME: ${{ matrix.rust-runtime }}
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/run-k8s-tests-on-garm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ jobs:
matrix:
vmm:
- clh #cloud-hypervisor
- dragonball
- fc #firecracker
- qemu
- cloud-hypervisor
snapshotter:
- devmapper
k8s:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/run-k8s-tests-on-zvsi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ jobs:
USING_NFD: "true"
TARGET_ARCH: "s390x"
steps:
- name: Adjust a permission for repo
run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE

- name: Take a pre-action for self-hosted runner
run: ${HOME}/script/pre_action.sh ubuntu-2204

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
# all the tests due to a single flaky instance.
fail-fast: false
matrix:
vmm: ['clh', 'qemu', 'stratovirt']
vmm: ['clh', 'qemu']
max-parallel: 1
runs-on: metrics
env:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/static-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:
- runtime-rs
- agent-ctl
- kata-ctl
- log-parser-rs
- runk
- trace-forwarder
command:
Expand All @@ -67,8 +66,6 @@ jobs:
component-path: src/tools/agent-ctl
- component: kata-ctl
component-path: src/tools/kata-ctl
- component: log-parser-rs
component-path: src/tools/log-parser-rs
- component: runk
component-path: src/tools/runk
- component: trace-forwarder
Expand Down Expand Up @@ -101,6 +98,9 @@ jobs:
- name: Install musl-tools
if: ${{ matrix.component != 'runtime' }}
run: sudo apt-get -y install musl-tools
- name: Install devicemapper
if: ${{ matrix.command == 'make check' && matrix.component == 'agent' }}
run: sudo apt-get -y install libdevmapper-dev
- name: Install libseccomp
if: ${{ matrix.command != 'make vendor' && matrix.command != 'make check' && matrix.install-libseccomp == 'yes' }}
run: |
Expand All @@ -110,6 +110,9 @@ jobs:
echo "Set environment variables for the libseccomp crate to link the libseccomp library statically"
echo "LIBSECCOMP_LINK_TYPE=static" >> $GITHUB_ENV
echo "LIBSECCOMP_LIB_PATH=${libseccomp_install_dir}/lib" >> $GITHUB_ENV
- name: Install protobuf-compiler
if: ${{ matrix.command == 'make check' && matrix.component == 'agent' }}
run: sudo apt-get -y install protobuf-compiler
- name: Setup XDG_RUNTIME_DIR for the `runtime` tests
if: ${{ matrix.command != 'make vendor' && matrix.command != 'make check' && matrix.component == 'runtime' }}
run: |
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 Intel Corporation
# Copyright (c) 2020-2023 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -22,7 +22,6 @@ TOOLS =
TOOLS += agent-ctl
TOOLS += kata-ctl
TOOLS += log-parser
TOOLS += log-parser-rs
TOOLS += runk
TOOLS += trace-forwarder

Expand All @@ -47,7 +46,7 @@ generate-protocols:

# Some static checks rely on generated source files of components.
static-checks: static-checks-build
bash ci/static-checks.sh
bash tests/static-checks.sh github.com/kata-containers/kata-containers

docs-url-alive-check:
bash ci/docs-url-alive-check.sh
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ The table below lists the remaining parts of the project:
| [kata-debug](tools/packaging/kata-debug/README.md) | infrastructure | Utility tool to gather Kata Containers debug information from Kubernetes clusters. |
| [`agent-ctl`](src/tools/agent-ctl) | utility | Tool that provides low-level access for testing the agent. |
| [`kata-ctl`](src/tools/kata-ctl) | utility | Tool that provides advanced commands and debug facilities. |
| [`log-parser-rs`](src/tools/log-parser-rs) | utility | Tool that aid in analyzing logs from the kata runtime. |
| [`trace-forwarder`](src/tools/trace-forwarder) | utility | Agent tracing helper. |
| [`runk`](src/tools/runk) | utility | Standard OCI container runtime based on the agent. |
| [`ci`](https://github.com/kata-containers/ci) | CI | Continuous Integration configuration files and scripts. |
Expand Down
Loading

0 comments on commit e38682a

Please sign in to comment.