From e7f72c6408600ec15d8a9bff19ba814b28972ff7 Mon Sep 17 00:00:00 2001 From: Olev Kartau Date: Tue, 14 Sep 2021 10:50:44 +0300 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 82 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..4bdf82800 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,82 @@ +name: e2e +on: + repository_dispatch: + types: [ok-to-e2e-command] + + workflow_dispatch: + inputs: + #ref: + # description: 'Ref to test' + # required: true + # default: 'main' + reuse_baremetal_session: + description: 'Re-use existing baremetal session if one found idle with needed capability' + required: true + default: 'true' + reuse_k8s_session: + description: 'Keep and re-use existing k8s setup (meaningful if reuse_baremetal_session=true)' + required: true + default: 'true' + distro: + description: 'Linux distribution (UBUNTU_20_04, UBUNTU_18_04)' + required: true + default: 'UBUNTU_20_04' + capability: + description: 'Capability required on the Bare Metal node(fpga, pmem, qat, generic)' + required: true + default: 'pmem' + cni: + description: 'Kubernetes CNI (calico, weave, flannel)' + required: true + default: 'calico' + container_runtime: + description: 'Container runtime(crio, containerd, docker)' + required: true + default: 'crio' + num_required_bm_hosts: + description: 'Number of required baremetal hosts' + required: true + default: '1' + +env: + REUSE_BAREMETAL_SESSION: ${{ github.event.inputs.reuse_baremetal_session }} + REUSE_K8S_SESSION: ${{ github.event.inputs.reuse_k8s_session }} + CAPABILITY: pmem + CNI: calico + CONTAINER_RUNTIME: crio + DISTRO: ${{ github.event.inputs.distro }} + NUM_REQUIRED_BM_HOSTS: ${{ github.event.inputs.num_required_bm_hosts }} + IMAGES: ${{ github.event.inputs.images }} + +jobs: + + pmem-bm-job: + name: pmem-bm-job + runs-on: self-hosted + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Prepare test environment + run: | + echo '---------' + echo 'Describing test environment' + echo "Event name: ${{ github.event_name }}" + echo "Event: ${{ github.event }}" + echo "Actor: ${{ github.actor }}" + echo "Head ref: ${{ github.head_ref }}" + echo "Ref: ${{ github.ref }}" + echo "SHA: ${{ github.sha }}" + echo "PR: ${{ github.event.issue.number }}" + echo "Images: ${{ github.event.inputs.images }}" + echo "Reuse_BM: ${{ github.event.inputs.reuse_baremetal_session }}" + echo "Reuse_K8S: ${{ github.event.inputs.reuse_k8s_session }}" + echo "Num_req_hosts: ${{ github.event.inputs.num_required_bm_hosts }}" + echo '---------' + ../../../../bmetal/actions-bmetal-runstage.sh prepare + - name: Run tests + run: | + ../../../../bmetal/actions-bmetal-runstage.sh test + - name: Clean up + run: | + echo 'Test cleanup, nothing here right now'