mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 12:08:40 +02:00
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:
parent
e45da58a4a
commit
8ec4d40b6a
5 changed files with 18 additions and 19 deletions
11
.github/workflows/deploy.yaml
vendored
11
.github/workflows/deploy.yaml
vendored
|
@ -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' }}
|
||||
|
|
16
.github/workflows/migrate.yaml
vendored
16
.github/workflows/migrate.yaml
vendored
|
@ -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' }}
|
|
@ -35,7 +35,7 @@ Where `credentials-<ENVIRONMENT>.json` looks like:
|
|||
}
|
||||
```
|
||||
|
||||
You can see the current environment with `cf env <APP>`, for example `cf env getgov-dev`.
|
||||
You can see the current environment with `cf env <APP>`, for example `cf env getgov-unstable`.
|
||||
|
||||
The command `cups` stands for [create user provided service](https://docs.cloudfoundry.org/devguide/services/user-provided.html). User provided services are the way currently recommended by Cloud.gov for deploying secrets. The user provided service is bound to the application in `manifest-<ENVIRONMENT>.json`.
|
||||
|
||||
|
@ -45,7 +45,7 @@ Example:
|
|||
|
||||
```bash
|
||||
cf uups getgov-credentials -p credentials-unstable.json
|
||||
cf restage getgov-dev --strategy rolling
|
||||
cf restage getgov-unstable --strategy rolling
|
||||
```
|
||||
|
||||
Non-secret environment variables can be declared in `manifest-<ENVIRONMENT>.json` directly.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
applications:
|
||||
- name: getgov-dev
|
||||
- name: getgov-unstable
|
||||
buildpacks:
|
||||
- python_buildpack
|
||||
path: ../../src
|
||||
|
@ -17,7 +17,7 @@ applications:
|
|||
# Tell Django where to find its configuration
|
||||
DJANGO_SETTINGS_MODULE: registrar.config.settings
|
||||
routes:
|
||||
- route: getgov-dev.app.cloud.gov
|
||||
- route: getgov-unstable.app.cloud.gov
|
||||
services:
|
||||
- getgov-credentials
|
||||
- getgov-database
|
|
@ -44,7 +44,7 @@ DEBUG = env.bool("DJANGO_DEBUG", default=False)
|
|||
|
||||
# TODO: configure and document security settings
|
||||
ALLOWED_HOSTS = [
|
||||
'getgov-dev.app.cloud.gov',
|
||||
'getgov-unstable.app.cloud.gov',
|
||||
'get.gov'
|
||||
]
|
||||
ALLOWED_CIDR_NETS = ['10.0.0.0/8'] # nosec
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue