HYPERSHIFT-ASSISTED-NIGHTLY-CI #623
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: HYPERSHIFT-ASSISTED-NIGHTLY-CI | |
on: | |
schedule: | |
- cron: '39 01 * * *' | |
env: | |
HOME: /root | |
PYTHONUNBUFFERED: true | |
CLUSTER: ci-hypershift-assisted | |
PULLSECRET: /root/openshift_pull.json | |
KUBECONFIG: /root/.kcli/clusters/ci-sno/auth/kubeconfig | |
PARAMFILE: openshift-ci-paramfiles/hypershift_assisted.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 | |
kcli create sushy-service | |
- name: Delete old install | |
run: | | |
kcli delete cluster --yes $CLUSTER || true | |
- 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 ASSISTED | |
run: | | |
kcli create cluster hypershift --pf $PARAMFILE -P pull_secret=$PULLSECRET $CLUSTER --force | |
clean-up: | |
needs: deploy-hypershift | |
runs-on: u08 | |
steps: | |
- name: Clean everything after success | |
run: | | |
kcli delete cluster --yes $CLUSTER |