-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/e2e: Migrate e2e test for s390x to GHA
This PR is to migrate the following e2e tests for s390x to GHA: - confidential-containers-operator-main-ubuntu-20.04-s390x-containerd_kata-qemu-baseline - confidential-containers-operator-main-ubuntu-20.04-s390x-containerd_kata-qemu-PR - confidential-containers-operator-main-ubuntu-20.04-s390x-SE-daily They are incorporated into the existing x86_64 test workflow `ccruntime_e2e.yaml`. The workflows incorparated are triggered not only by PR, but also nightly at 2:00 UTC. Fixes: #294 Signed-off-by: Hyounggyu Choi <[email protected]>
- Loading branch information
Showing
5 changed files
with
169 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: ccruntime e2e test nightly | ||
on: | ||
schedule: | ||
- cron: '0 2 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
e2e-nightly: | ||
uses: ./.github/workflows/ccruntime_e2e.yaml | ||
with: | ||
target-branch: ${{ github.ref_name }} | ||
|
||
e2e-ibm-se-nightly: | ||
runs-on: s390x | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test_title: | ||
- cc-operator-e2e-tests | ||
steps: | ||
- name: Fetch a test result for {{ matrix.test_title }} | ||
run: | | ||
file_name="${TEST_TITLE}-$(date +%Y-%m-%d).log" | ||
/home/${USER}/script/handle_test_log.sh download $file_name | ||
env: | ||
TEST_TITLE: ${{ matrix.test_title }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: ccruntime e2e test for PR | ||
on: | ||
pull_request_target: | ||
branches: | ||
- 'main' | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
paths-ignore: | ||
- 'docs/**' | ||
|
||
jobs: | ||
e2e-pr: | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }} | ||
uses: ./.github/workflows/ccruntime_e2e.yaml | ||
with: | ||
target-branch: ${{ github.event.pull_request.base.ref }} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright Confidential Containers Contributors | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
function add_kata_bot_info() { | ||
if [ -z $PUSHER_NAME ] || [ -z $PUSHER_EMAIL ]; then | ||
>&2 echo "PUSHER_NAME and PUSHER_EMAIL must be set" | ||
exit 1 | ||
fi | ||
echo "Adding user name ${PUSER_NAME} and email ${PUSHER_EMAIL} to the local git repo" | ||
git config user.name "${PUSHER_NAME}" | ||
git config user.email "${PUSHER_EMAIL}" | ||
} | ||
|
||
function rebase_atop_of_the_latest_target_branch() { | ||
if [ -n "${TARGET_BRANCH}" ]; then | ||
echo "Rebasing atop of the latest ${TARGET_BRANCH}" | ||
# Recover from any previous rebase left halfway | ||
git rebase --abort 2> /dev/null || true | ||
if ! git rebase origin/${TARGET_BRANCH}; then | ||
echo "Rebase failed, exiting" | ||
exit 1 | ||
fi | ||
fi | ||
} | ||
|
||
function main() { | ||
action="${1:-}" | ||
|
||
add_kata_bot_info | ||
case "${action}" in | ||
rebase-atop-of-the-latest-target-branch) rebase_atop_of_the_latest_target_branch;; | ||
*) >&2 echo "Invalid argument"; exit 2 ;; | ||
esac | ||
} | ||
|
||
main "$@" |