Skip to content

HYPERSHIFT-NIGHTLY-CI #813

HYPERSHIFT-NIGHTLY-CI

HYPERSHIFT-NIGHTLY-CI #813

name: HYPERSHIFT-NIGHTLY-CI
on:
schedule:
- cron: '31 22 * * *'
env:
HOME: /root
PYTHONUNBUFFERED: true
CLUSTER: ci-hypershift
PULLSECRET: /root/openshift_pull.json
KUBECONFIG: /root/.kcli/clusters/ci-sno/auth/kubeconfig
PARAMFILE: openshift-ci-paramfiles/hypershift.yml
jobs:
requirements:
if: github.repository == 'karmab/kcli'
runs-on: u08
steps:
- uses: actions/checkout@v2
- run: git pull origin ${GITHUB_REF##*/}
- name: Install kcli
run: |
curl https://raw.githubusercontent.com/karmab/kcli/main/install.sh | bash
- name: Wait for default storage class
run: |
TIMEOUT=0
while [ "$TIMEOUT" -lt "240" ] ; do
STORAGECLASSES=$(oc get storageclass -o jsonpath='{range .items[?(@.metadata.annotations.storageclass\.kubernetes\.io/is-default-class=="true")]}{.metadata.name}{"\n"}{end}')
[ ! -z $STORAGECLASSES ] && exit 0
sleep 20
TIMEOUT=$(( $TIMEOUT + 20 ))
break
done
exit 1
deploy-hypershift:
needs: requirements
runs-on: u08
steps:
- name: Deploy hypershift cluster
run: kcli create cluster hypershift --pf $PARAMFILE -P pull_secret=$PULLSECRET $CLUSTER --force
- name: Clean everything
if: always()
run: kcli delete cluster --yes $CLUSTER