Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
okartau authored Sep 14, 2021
1 parent 30dd03b commit e7f72c6
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit e7f72c6

Please sign in to comment.