mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-15 14:04:10 +02:00
delete yaml script
This commit is contained in:
parent
33c4f6497f
commit
94c6321529
1 changed files with 0 additions and 88 deletions
|
@ -1,88 +0,0 @@
|
||||||
# This workflow can be run from the CLI
|
|
||||||
# gh workflow run reset-db.yaml -f environment=ENVIRONMENT
|
|
||||||
# OR
|
|
||||||
# cf run-task getgov-ENVIRONMENT --command 'python manage.py flush' --name flush
|
|
||||||
# cf run-task getgov-ENVIRONMENT --command 'python manage.py load' --name loaddata
|
|
||||||
|
|
||||||
name: Reset database
|
|
||||||
run-name: Reset database for ${{ github.event.inputs.environment }} without taking down the sandbox
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
environment:
|
|
||||||
type: choice
|
|
||||||
description: Which environment should we flush and re-load data for?
|
|
||||||
options:
|
|
||||||
- staging
|
|
||||||
- development
|
|
||||||
- el
|
|
||||||
- ad
|
|
||||||
- ms
|
|
||||||
- ag
|
|
||||||
- litterbox
|
|
||||||
- hotgov
|
|
||||||
- cb
|
|
||||||
- bob
|
|
||||||
- meoward
|
|
||||||
- backup
|
|
||||||
- ky
|
|
||||||
- es
|
|
||||||
- nl
|
|
||||||
- rh
|
|
||||||
- za
|
|
||||||
- gd
|
|
||||||
- rb
|
|
||||||
- ko
|
|
||||||
- ab
|
|
||||||
- rjm
|
|
||||||
- dk
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
reset-db:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
CF_USERNAME: CF_${{ github.event.inputs.environment }}_USERNAME
|
|
||||||
CF_PASSWORD: CF_${{ github.event.inputs.environment }}_PASSWORD
|
|
||||||
steps:
|
|
||||||
- name: Unbind the database service
|
|
||||||
uses: cloud-gov/cg-cli-tools@main
|
|
||||||
with:
|
|
||||||
cf_username: ${{ secrets[env.CF_USERNAME] }}
|
|
||||||
cf_password: ${{ secrets[env.CF_PASSWORD] }}
|
|
||||||
cf_org: cisa-dotgov
|
|
||||||
cf_space: ${{ github.event.inputs.environment }}
|
|
||||||
cf_command: "cf unbind-service getgov-${{ github.event.inputs.environment }} getgov-${{ github.event.inputs.environment }}-database"
|
|
||||||
- name: Delete the service
|
|
||||||
uses: cloud-gov/cg-cli-tools@main
|
|
||||||
with:
|
|
||||||
cf_username: ${{ secrets[env.CF_USERNAME] }}
|
|
||||||
cf_password: ${{ secrets[env.CF_PASSWORD] }}
|
|
||||||
cf_org: cisa-dotgov
|
|
||||||
cf_space: ${{ github.event.inputs.environment }}
|
|
||||||
cf_command: "cf unbind-service getgov-${{ github.event.inputs.environment }} getgov-${{ github.event.inputs.environment }}-database"
|
|
||||||
-name: Recreate the service
|
|
||||||
uses: cloud-gov/cg-cli-tools@main
|
|
||||||
with:
|
|
||||||
cf_username: ${{ secrets[env.CF_USERNAME] }}
|
|
||||||
cf_password: ${{ secrets[env.CF_PASSWORD] }}
|
|
||||||
cf_org: cisa-dotgov
|
|
||||||
cf_space: ${{ github.event.inputs.environment }}
|
|
||||||
cf_command: "cf create-service aws-rds micro-psql getgov-${{ github.event.inputs.environment }} getgov-${{ github.event.inputs.environment }}-database"
|
|
||||||
-name: Recreate the service
|
|
||||||
uses: cloud-gov/cg-cli-tools@main
|
|
||||||
with:
|
|
||||||
cf_username: ${{ secrets[env.CF_USERNAME] }}
|
|
||||||
cf_password: ${{ secrets[env.CF_PASSWORD] }}
|
|
||||||
cf_org: cisa-dotgov
|
|
||||||
cf_space: ${{ github.event.inputs.environment }}
|
|
||||||
cf_command: "cf create-service aws-rds micro-psql getgov-${{ github.event.inputs.environment }} getgov-${{ github.event.inputs.environment }}-database"
|
|
||||||
-name: Rebind the service
|
|
||||||
uses: cloud-gov/cg-cli-tools@main
|
|
||||||
with:
|
|
||||||
cf_username: ${{ secrets[env.CF_USERNAME] }}
|
|
||||||
cf_password: ${{ secrets[env.CF_PASSWORD] }}
|
|
||||||
cf_org: cisa-dotgov
|
|
||||||
cf_space: ${{ github.event.inputs.environment }}
|
|
||||||
cf_command: "cf bind-service getgov-env getgov-${{ github.event.inputs.environment }}"
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue