Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023-11-08 | MAIN --> PROD | DEV (ad1b6e7) --> STAGING #2765

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/adr-issue-template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
name: ADR issue template
about: Starting point for architecture decision records
title: '[ADR] <title>'
labels: 'adr'
assignees: ''
---

## Areas of impact

- [ ] Compliance
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/historic-data-migrator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Historic Data Migration
on:
workflow_dispatch:
inputs:
environment:
required: true
type: choice
description: The environment the workflow should run on.
options:
- dev
- staging
- preview
dbkeys:
required: false
type: string
description: Comma-separated list of report-IDs.
years:
required: false
type: string
description: Comma-separated list of report years. The list of years needs to be the same length as the list of dbkeys.

jobs:
historic-data-migrator:
name: Generate and disseminate historic data in ${{ inputs.environment }} database
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
env:
space: ${{ inputs.environment }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run Django command to generate and disseminate historic data in ${{ inputs.environment }}
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CF_USERNAME }}
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: gsa-tts-oros-fac
cf_space: ${{ env.space }}
command: cf run-task gsa-fac -k 2G -m 2G --name historic_data_migrator --command "python manage.py historic-data-migrator --dbkeys ${{ inputs.dbkeys }} --years ${{ inputs.years }}"
6 changes: 6 additions & 0 deletions backend/census_historical_migration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ docker compose run web python manage.py historic_workbook_generator
```
- `year` is optional and defaults to `22`.
- The `output` directory will be created if it doesn't already exist.

### How to trigger historic data migrator from GitHub:
- Go to GitHub Actions and select `Historic data migrator` action
- Next, click on `Run workflow` on top right and
- Provide the target `environment` along with optional parameters such as `dbkeys` and `years`
- Click `Run`
Loading