-
Notifications
You must be signed in to change notification settings - Fork 147
45 lines (41 loc) · 1.38 KB
/
hypershift-nightly-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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