nightly-ci #469
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: nightly-ci | |
on: | |
schedule: | |
- cron: '01 1 * * *' | |
env: | |
HOME: /root | |
PYTHONUNBUFFERED: true | |
CLUSTER: ci-ai | |
NODES: 3 | |
PULLSECRET: /root/openshift_pull.json | |
PARAMFILE: .github/aicli_parameters.yml | |
PLANFILE: .github/kcli_plan.yml | |
AI_OFFLINETOKEN: ${{ secrets.AI_OFFLINETOKEN }} | |
jobs: | |
requirements: | |
runs-on: libvirt | |
steps: | |
- uses: actions/checkout@v2 | |
- run: git pull origin ${GITHUB_REF##*/} | |
- name: Install kcli | |
run: | | |
curl https://raw.githubusercontent.com/karmab/kcli/master/install.sh | bash | |
kcli create sushy-service | |
- name: Install aicli | |
run: | | |
pip3 install -U assisted-service-client | |
python3 setup.py install | |
- name: Clean up | |
continue-on-error: true | |
run: | | |
kcli delete plan --yes $CLUSTER || true | |
deploy-kcli-plan: | |
needs: requirements | |
runs-on: libvirt | |
steps: | |
- name: Deploy kcli plan | |
run: kcli -C local create plan -f $PLANFILE -P NODES=$NODES $CLUSTER | |
deploy-ai-cluster: | |
needs: deploy-kcli-plan | |
runs-on: libvirt | |
timeout-minutes: 70 | |
steps: | |
- name: Deploy ai cluster | |
run: | | |
aicli create deployment --pf $PARAMFILE -P pull_secret=$PULLSECRET $CLUSTER --force | |
clean-up: | |
needs: deploy-ai-cluster | |
runs-on: libvirt | |
steps: | |
- name: Clean everything after success | |
run: | | |
kcli -C local delete plan --yes $CLUSTER |