Skip to content

Commit

Permalink
add lane
Browse files Browse the repository at this point in the history
Signed-off-by: Or Shoval <[email protected]>
  • Loading branch information
oshoval committed Jun 18, 2024
1 parent 49484f9 commit ac5b3c3
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 12 additions & 5 deletions automation/check-patch.e2e-kubevirt-ipam-controller-functests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
Expand All @@ -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
Expand Down

0 comments on commit ac5b3c3

Please sign in to comment.