Skip to content

7. Daily airgap mode test #782

7. Daily airgap mode test

7. Daily airgap mode test #782

Workflow file for this run

name: 7. Daily airgap mode test
on:
workflow_dispatch:
schedule:
# every day 14:00(UTC) = 22:00(Beijing),
- cron: '0 20 * * *'
jobs:
git_ref:
runs-on: [self-hosted, offline]
outputs:
git_tag: ${{ steps.gen_tag.outputs.git_tag }}
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: gen_tag
name: gen_tag
run: |
GIT_TAG=$(git describe --tags --abbrev=8 --dirty)
TAG_SECOND_PART=`echo ${GIT_TAG}|awk -F "-" '{print $2 }'`
if [[ ${TAG_SECOND_PART} =~ rc[0-9]+ ]];then
TAG=`echo ${GIT_TAG}|awk -F "-" '{print $1"-"$2 }'`
else
TAG=`echo ${GIT_TAG}|awk -F "-" '{print $1}'`
fi
echo "TAG=${TAG}"
echo "git_tag=${TAG}" >> $GITHUB_OUTPUT
kubean_resource_build:
runs-on: [self-hosted, offline]
needs: git_ref
permissions:
packages: write
contents: read
steps:
- id: resource_build
name: resource_build
env:
KUBEAN_TAG: ${{ needs.git_ref.outputs.git_tag }}
run: |
bash hack/kubean_resource.sh ${KUBEAN_TAG} "offline-test"
offline_e2e:
runs-on: [self-hosted, offline]
timeout-minutes: 900
needs: [git_ref, kubean_resource_build]
permissions:
packages: write
contents: read
steps:
- id: offline_e2e_id
name: offline_e2e_test
env:
KUBEAN_TAG: ${{ needs.git_ref.outputs.git_tag }}
VSPHERE_USER: ${{ secrets.VSPHERE_USER }}
VSPHERE_PASSWD: ${{ secrets.VSPHERE_PASSWD }}
AMD_ROOT_PASSWORD: ${{ secrets.AMD_ROOT_PASSWORD }}
KYLIN_VM_PASSWORD: ${{ secrets.KYLIN_VM_PASSWORD }}
run: |
echo "${KUBEAN_TAG}"
bash hack/offline-e2e.sh "${KUBEAN_TAG}" "${VSPHERE_USER}" "${VSPHERE_PASSWD}" "${AMD_ROOT_PASSWORD}" "${KYLIN_VM_PASSWORD}" "${{ runner.name }}"