From ac5b3c34ca40a7e6b4c9c1beb8c25153b54967af Mon Sep 17 00:00:00 2001 From: Or Shoval Date: Tue, 18 Jun 2024 13:58:00 +0300 Subject: [PATCH] add lane Signed-off-by: Or Shoval --- .github/workflows/checks.yaml | 29 +++++++++++++++++++ ....e2e-kubevirt-ipam-controller-functests.sh | 17 +++++++---- 2 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/checks.yaml diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml new file mode 100644 index 0000000000..08ce68f1f1 --- /dev/null +++ b/.github/workflows/checks.yaml @@ -0,0 +1,29 @@ +name: Checks +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + e2e: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version-file: 'go.mod' + + - name: Run e2e tests + env: + KIND_ALLOW_SYSTEM_WRITES: true + run: automation/check-patch.e2e-kubevirt-ipam-controller-functests.sh + + - uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: test-e2e-results + path: _out/*.xml diff --git a/automation/check-patch.e2e-kubevirt-ipam-controller-functests.sh b/automation/check-patch.e2e-kubevirt-ipam-controller-functests.sh index e73faeb8f4..bb65caa0c9 100755 --- a/automation/check-patch.e2e-kubevirt-ipam-controller-functests.sh +++ b/automation/check-patch.e2e-kubevirt-ipam-controller-functests.sh @@ -4,7 +4,7 @@ set -xeuE # automation/check-patch.e2e-kubevirt-ipam-controller-functests.sh -ARTIFACTS=$(pwd)/_out +export ARTIFACTS=$(pwd)/_out teardown() { cd ${TMP_COMPONENT_PATH} @@ -16,6 +16,17 @@ teardown() { main() { mkdir -p $ARTIFACTS + if [ "$GITHUB_ACTIONS" == "true" ]; then + ARCH="amd64" + OS_TYPE="linux" + kubevirt_version="$(curl -L https://storage.googleapis.com/kubevirt-prow/release/kubevirt/kubevirt/stable.txt)" + kubevirt_release_url="https://github.com/kubevirt/kubevirt/releases/download/${kubevirt_version}" + cli_name="virtctl-${kubevirt_version}-${OS_TYPE}-${ARCH}" + curl -LO "${kubevirt_release_url}/${cli_name}" + chmod +x ${cli_name} + mv ${cli_name} /usr/local/bin + fi + # Setup CNAO and artifacts temp directory source automation/check-patch.setup.sh cd ${TMP_PROJECT_PATH} @@ -24,12 +35,8 @@ main() { COMPONENT="kubevirt-ipam-controller" source automation/components-functests.setup.sh cd ${TMP_COMPONENT_PATH} - # TODO we need new tag - # curl -L https://github.com/maiqueb/kubevirt-ipam-claims/pull/20.patch | git apply - # sed -i 's/-ikv //' hack/cluster.sh export KIND_ARGS="-ic -i6 -mne" make cluster-up - #${TMP_COMPONENT_PATH}/.output/kind get kubeconfig --name virt-ipam > ${TMP_COMPONENT_PATH}/.kubeconfig export KUBECONFIG=${TMP_COMPONENT_PATH}/.output/kubeconfig trap teardown EXIT