mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-04 17:01:56 +02:00
Create dev sandboxes scripts and first sandbox (#370)
* Add templates, scripts, and process documentation for creating and destroying developer sandboxes * Create developer sandbox 'lmm' infrastructure * fix up newlines * fix action syntax pull_request * add a line about the public.crt to developer docs * add docs about branch conventions * add new developer sandbox 'ik' infrastructure * Add new developer sandbox 'nmb' infrastructure * Add new developer sandbox 'sspj' infrastructure * Add new developer sandbox 'mr' infrastructure * make github actions dynamic by environment * trying something out with dynamic github action for dev sandbox * consolidate github actions to dynamic action * try out run name * combo run name and name * respond to comments
This commit is contained in:
parent
6a54bf1ff4
commit
508e5384cb
18 changed files with 524 additions and 67 deletions
51
.github/workflows/deploy-sandbox.yaml
vendored
Normal file
51
.github/workflows/deploy-sandbox.yaml
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
# This workflow runs on pushes when a pull request is opened under certain branch conventions.
|
||||
|
||||
name: Build and deploy developer sandbox
|
||||
run-name: Build and deploy developer sandbox for branch ${{ github.ref_name }}
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
branches:
|
||||
- 'ik/**'
|
||||
- 'sspj/**'
|
||||
- 'lmm/**'
|
||||
- 'nmb/**'
|
||||
- 'mr/**'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Split branch name
|
||||
env:
|
||||
BRANCH: ${{ github.ref_name }}
|
||||
id: split
|
||||
run: echo "::set-output name=fragment::${BRANCH##*/}"
|
||||
- name: Set secrets
|
||||
id: secret
|
||||
run: |
|
||||
echo "::set-output name=cf_username::CF_${{ steps.split.outputs.fragment }}_USERNAME"
|
||||
echo "::set-output name=cf_password::CF_${{ steps.split.outputs.fragment }}_PASSWORD"
|
||||
- name: Compile USWDS assets
|
||||
working-directory: ./src
|
||||
run: |
|
||||
docker compose run node npm install &&
|
||||
docker compose run node npx gulp copyAssets &&
|
||||
docker compose run node npx gulp compile
|
||||
- name: Collect static assets
|
||||
working-directory: ./src
|
||||
run: docker compose run app python manage.py collectstatic
|
||||
- name: Deploy to cloud.gov sandbox
|
||||
uses: 18f/cg-deploy-action@main
|
||||
env:
|
||||
DEPLOY_NOW: thanks
|
||||
with:
|
||||
cf_username: ${{ secrets[steps.secret.outputs.cf_username] }}
|
||||
cf_password: ${{ secrets[steps.secret.outputs.cf_password] }}
|
||||
cf_org: cisa-getgov-prototyping
|
||||
cf_space: ${{ steps.split.outputs.fragment }}
|
||||
push_arguments: "-f ops/manifests/manifest-${{ steps.split.outputs.fragment }}.yaml"
|
Loading…
Add table
Add a link
Reference in a new issue