-
Notifications
You must be signed in to change notification settings - Fork 145
54 lines (50 loc) · 1.52 KB
/
hypershift-assisted-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
46
47
48
49
50
51
52
53
54
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