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

Add baseline jobs for Confidential Containers #543

Merged
merged 2 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
112 changes: 105 additions & 7 deletions jobs-builder/jobs/cc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,92 @@
started-status: Build running
builders:
- shell:
!j2: |
#!/bin/bash
!include-jinja2: include/operator-ci_entrypoint.sh.inc

sudo apt-get update -y
sudo apt-get install -y ansible python-is-python3
cd tests/e2e
export PATH="$PATH:/usr/local/bin"
./run-local.sh -r {{ runtimeclass }} {%+ if baremetal == "true" %}-u{% endif %}
- job-template:
# Use to generate baseline jobs for Kata Containers.
#
# Arguments:
# os - the node Operating System in <name>-<version> format.
# arch - the node architecture (e.g x86_64, s390x, ppc64le, and so on).
# ci_job - the CI job type as defined in https://github.com/kata-containers/tests/blob/main/.ci/ci_job_flags.sh
# maintainers - a list of maintainer (use the github's mentions @somebody).
#
name: "kata-containers-CCv0-{os}-{arch}-{ci_job}-baseline"
<<: *cc_jobs_common_properties
# Allow concurrent jobs by default. Specify `false` on the project definition otherwise.
concurrent_toggle: true
description:
!j2: |
<pre>
Baseline job.
/scheduled
status="Stable"
OS="{{ os }}"
arch="{{ arch }}"
branch="CCv0"
CI_JOB="{{ ci_job }}"
repo="kata-containers"
type="baseline"
Maintainers:
{% for i in maintainers -%}
- {{ i }}
{% endfor %}
</pre>
scm:
- git:
url: https://github.com/kata-containers/kata-containers
branches:
- '*/CCv0'
wipe-workspace: false
triggers:
- timed: 'H 0 * * *'
builders:
- shell:
!include-jinja2: include/cc-ci_entrypoint.sh.inc
<<: *cc_jobs_common_publishers

- job-template:
# Use to generate baseline jobs for the operator.
#
# Arguments:
# os - the node Operating System in <name>-<version> format.
# arch - the node architecture (e.g x86_64, s390x, ppc64le, and so on).
# container_runtime - the container runtime (e.g. containerd, crio, and so on).
# runtimeclass - the kata runtimeclass (e.g. kata-qemu, kata-clh, and so on).
# maintainers - a list of maintainer (use the github's mentions @somebody).
#
name: "confidential-containers-operator-main-{os}-{arch}-{container_runtime}_{runtimeclass}-baseline"
<<: *cc_jobs_common_properties
# Allow concurrent jobs by default. Specify `false` on the project definition otherwise.
concurrent_toggle: true
description:
!j2: |
<pre>
Baseline job.
/scheduled
status="Stable"
OS="{{ os }}"
arch="{{ arch }}"
branch="main"
repo="confidential-containers/operator"
type="baseline"
Maintainers:
{% for i in maintainers -%}
- {{ i }}
{% endfor %}
</pre>
scm:
- git:
url: https://github.com/confidential-containers/operator
branches:
- '*/main'
wipe-workspace: false
triggers:
- timed: 'H 0 * * *'
builders:
- shell:
!include-jinja2: include/operator-ci_entrypoint.sh.inc

###
# Define the projects
Expand All @@ -227,8 +305,11 @@
- CC_CRI_CONTAINERD
- CC_CRI_CONTAINERD_CLOUD_HYPERVISOR
- CC_CRI_CONTAINERD_K8S
maintainers:
- '@wainersm'
jobs:
- '{repo}-CCv0-{os}-{arch}-{ci_job}-PR'
- 'kata-containers-CCv0-{os}-{arch}-{ci_job}-baseline'
- project:
name: "Generate jobs for the Confidential Containers Operator"
os:
Expand All @@ -241,8 +322,12 @@
runtimeclass:
- kata-qemu
- kata-clh
maintainers:
- '@wainersm'
- '@fidencio'
jobs:
- 'confidential-containers-operator-main-{os}-{arch}-{container_runtime}_{runtimeclass}-PR'
- 'confidential-containers-operator-main-{os}-{arch}-{container_runtime}_{runtimeclass}-baseline'
- project:
# The node label is selected based on this project name. Be careful if you
# need to change the name.
Expand All @@ -256,8 +341,11 @@
- containerd
runtimeclass:
- kata-qemu-sev
maintainers:
- '@ryansavino'
jobs:
- 'confidential-containers-operator-main-{os}-{arch}-{container_runtime}_{runtimeclass}-PR'
- 'confidential-containers-operator-main-{os}-{arch}-{container_runtime}_{runtimeclass}-baseline'
- project:
name: "Generate jobs for Confidential Containers on AMD SEV"
repo:
Expand All @@ -271,8 +359,11 @@
tee: "sev"
ci_job:
- CC_SEV_CRI_CONTAINERD_K8S
maintainers:
- '@ryansavino'
jobs:
- '{repo}-CCv0-{os}-{arch}-{ci_job}-PR'
- 'kata-containers-CCv0-{os}-{arch}-{ci_job}-baseline'

###
# Define stand-alone jobs.
Expand All @@ -288,3 +379,10 @@
triggers:
- pollscm:
cron: "@hourly"
###
# Define views.
###
- view:
name: Daily CCv0 baseline
view-type: list
regex: '.*\(operator-main\|CCv0\)-.*-baseline'
15 changes: 15 additions & 0 deletions jobs-builder/jobs/include/operator-ci_entrypoint.sh.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
#
# Copyright (c) 2023 Red Hat, Inc.
# SPDX-License-Identifier: Apache-2.0
#
{# Run the Operator CI tests.
This is a jinja2 template.
#}

sudo apt-get update -y
sudo apt-get install -y ansible python-is-python3
cd tests/e2e
export PATH="$PATH:/usr/local/bin"
./run-local.sh -r "{{ runtimeclass }}" {%+ if baremetal == "true" %}-u{% endif %}