MICROSHIFT-NIGHTLY-CI #273
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: MICROSHIFT-NIGHTLY-CI | |
on: | |
schedule: | |
- cron: '00 18 * * *' | |
env: | |
HOME: /root | |
PYTHONUNBUFFERED: true | |
CLUSTER: ci-microshift | |
PULLSECRET: /root/openshift_pull.json | |
VERSION: stable | |
TAG: "4.17" | |
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: Delete old install | |
run: kcli delete cluster --yes $CLUSTER || true | |
deploy-microshift: | |
needs: requirements | |
runs-on: u08 | |
steps: | |
- name: Deploy Microshift | |
run: kcli create cluster microshift -P pull_secret=$PULLSECRET -P version=$VERSION -P tag="$TAG" $CLUSTER | |
verify-microshift: | |
needs: deploy-microshift | |
runs-on: u08 | |
steps: | |
- name: Verify Microshift | |
run: | | |
sleep 240 | |
export KUBECONFIG=$HOME/.kcli/clusters/$CLUSTER/auth/kubeconfig | |
[ "$(oc get pods -A --field-selector=status.phase!=Running -o name | wc -l)" == "0" ] || exit 1 | |
clean-up: | |
needs: verify-microshift | |
runs-on: u08 | |
steps: | |
- name: Clean everything after success | |
run: kcli delete cluster --yes $CLUSTER |