Skip to content

Commit

Permalink
Merge pull request #537 from cpanel/RE-745_pruner_cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
toddr authored Oct 30, 2024
2 parents 1c773ca + 4fdd36e commit 37feb64
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/openstack/prune_openstack
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ export OS_AUTH_URL=https://keystone.hou-01.cloud.prod.cpanel.net:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_REGION_NAME="RegionOne"
export OS_INTERFACE=public
export OS_APPLICATION_CREDENTIAL_ID=${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
export OS_APPLICATION_CREDENTIAL_SECRET=${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}

# two hours ago
HAMMER_TIME=$(date -d '-2 hour' --utc +"%Y-%m-%dT%H:%M:%SZ")
Expand Down Expand Up @@ -63,11 +61,13 @@ remove_volumes () {
}

# prune VMs
get_packer_instances
get_elevatebcl_instances
remove_stale_instances
# prune keys
get_keys
remove_stale_keys
# prune volumes
get_volumes
remove_volumes
remove_volumes

exit 0;
3 changes: 3 additions & 0 deletions .github/workflows/pruner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
jobs:
run-pruner:
runs-on: [self-hosted]
env:
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
steps:
- uses: actions/checkout@v4
- name: Run Openstack Pruner
Expand Down

0 comments on commit 37feb64

Please sign in to comment.