Rename environments for consistency

- dev is local laptop
- unstable (or sandbox) is latest cut of main (or for experiments)
- staging is stable tagged releases
This commit is contained in:
Seamus Johnston 2022-08-18 14:54:14 -05:00
parent e45da58a4a
commit 8ec4d40b6a
No known key found for this signature in database
GPG key ID: 2F21225985069105
5 changed files with 18 additions and 19 deletions

View file

@ -17,9 +17,9 @@ on:
workflow_dispatch:
jobs:
deploy-dev:
deploy-unstable:
# if this job runs on a branch, we deduce that code
# has been pushed to main and should be deployed to dev
# has been pushed to main and should be deployed to unstable
if: ${{ github.ref_type == 'branch' }}
runs-on: ubuntu-latest
steps:
@ -34,10 +34,9 @@ jobs:
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: sandbox-gsa
cf_space: dotgov-poc
push_arguments: "-f ops/manifests/manifest-dev.yaml"
push_arguments: "-f ops/manifests/manifest-unstable.yaml"
# deploy:
# deploy-staging:
# # if this job runs on a tag, we deduce that code
# # has been tagged for release and should be deployed to
# # ____? (staging? prod?)
# # has been tagged for release and should be deployed to staging
# if: ${{ github.ref_type == 'tag' }}

View file

@ -3,7 +3,7 @@ name: Run Migrations
# This workflow can be run from the CLI
# gh workflow run migrate.yaml -f environment=sandbox
# OR
# cf run-task getgov-dev --wait \
# cf run-task getgov-unstable --wait \
# --command 'python manage.py migrate' --name migrate
on:
@ -13,22 +13,22 @@ on:
type: choice
description: Where should we run migrations
options:
- sandbox
- production
- unstable
- staging
jobs:
migrate-dev:
if: ${{ github.event.inputs.environment == 'sandbox' }}
migrate-unstable:
if: ${{ github.event.inputs.environment == 'unstable' }}
runs-on: ubuntu-latest
steps:
- name: Run Django migrations for sandbox
- name: Run Django migrations for unstable
uses: 18f/cg-deploy-action@main
with:
cf_username: ${{ secrets.CF_USERNAME }}
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: sandbox-gsa
cf_space: dotgov-poc
full_command: "cf run-task getgov-dev --wait --command 'python manage.py migrate' --name migrate"
full_command: "cf run-task getgov-unstable --wait --command 'python manage.py migrate' --name migrate"
# migrate:
# if: ${{ github.event.inputs.environment == 'production' }}
# if: ${{ github.event.inputs.environment == 'staging' }}