Clean up instances (Omnistrate deployments) running in the QA environment #50
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: Clean up instances (Omnistrate deployments) running in the QA environment | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '23 22 * * *' | |
env: | |
OMNISTRATE_INTERNAL_SERVICE_ID: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }} | |
OMNISTRATE_INTERNAL_DEV_ENVIRONMENT: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT }} | |
OMNISTRATE_USERNAME: ${{ secrets.OMNISTRATE_USERNAME }} | |
OMNISTRATE_PASSWORD: ${{ secrets.OMNISTRATE_PASSWORD }} | |
jobs: | |
cleanup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
- name: Install requests module and run cleanup.py script to delete all instances (Omnistrate deployments) in QA environment | |
run: | | |
pip3 install --no-cache-dir requests | |
python3 ./cleanup/cleanup-qa-instances-script.py |