From 3f8cf0ca1a127ff8fc2189fcc2f36c5e15d8bf1c Mon Sep 17 00:00:00 2001 From: Eva Maxfield Brown Date: Wed, 17 Aug 2022 16:16:45 -0700 Subject: [PATCH 1/3] Remove pulumi, use new infra stack, update docs --- .github/dependabot.yml | 22 ++++ .github/workflows/build.yml | 12 +- .../workflows/deployment-management-bot.yml | 49 ++------ .../instance-configuration-validation-bot.yml | 16 ++- .github/workflows/scripts/requirements.txt | 2 +- .github/workflows/scripts/validate_form.py | 2 +- .github/workflows/test.yml | 2 +- README.md | 31 +---- .../.github/dependabot.yml | 7 -- .../.github/workflows/build-main.yml | 2 +- .../.github/workflows/check-pr.yml | 2 +- .../.github/workflows/deploy-infra.yml | 43 +++++-- .../.github/workflows/deploy-web.yml | 13 +- .../workflows/event-gather-pipeline.yml | 4 +- .../workflows/event-index-pipeline.yml | 8 +- .../workflows/process-special-event.yml | 4 +- .../.github/workflows/run-script.yml | 4 +- .../Justfile | 12 ++ .../Makefile | 19 --- .../SETUP/Makefile | 45 ------- .../SETUP/Pulumi.yaml | 3 - .../SETUP/README.md | 115 ++++++++---------- .../SETUP/cors.json | 7 -- .../updating-to-new-cookiecutter-releases.md | 24 ++-- .../infra/Pulumi.yaml | 3 - .../infra/__main__.py | 19 --- .../infra/requirements.txt | 2 - .../python/setup.py | 20 ++- 28 files changed, 185 insertions(+), 307 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 {{ cookiecutter.hosting_github_repo_name }}/Justfile delete mode 100644 {{ cookiecutter.hosting_github_repo_name }}/Makefile delete mode 100644 {{ cookiecutter.hosting_github_repo_name }}/SETUP/Makefile delete mode 100644 {{ cookiecutter.hosting_github_repo_name }}/SETUP/Pulumi.yaml delete mode 100644 {{ cookiecutter.hosting_github_repo_name }}/SETUP/cors.json delete mode 100644 {{ cookiecutter.hosting_github_repo_name }}/infra/Pulumi.yaml delete mode 100644 {{ cookiecutter.hosting_github_repo_name }}/infra/__main__.py delete mode 100644 {{ cookiecutter.hosting_github_repo_name }}/infra/requirements.txt diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..7e55e20d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,22 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/.github" + schedule: + interval: "monthly" + commit-message: + prefix: "ci(dependabot):" + + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "daily" + allow: + - dependency-name: "cdp-backend" + + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + allow: + - dependency-name: "@councildataproject/cdp-frontend" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16a28dd7..bf71d635 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: '3.10' - name: Setup Node uses: actions/setup-node@v1 with: @@ -59,11 +59,7 @@ jobs: npm run build # Publish the generated repo - - name: Publish Generated Repo - uses: JamesIves/github-pages-deploy-action@releases/v3 + - name: Publish Docs + uses: JamesIves/github-pages-deploy-action@v4 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BASE_BRANCH: main # The branch the action should deploy from. - BRANCH: 'example-build' # The branch the action should deploy to. - FOLDER: example/ # The folder the action should deploy - CLEAN: true + folder: example/ diff --git a/.github/workflows/deployment-management-bot.yml b/.github/workflows/deployment-management-bot.yml index 9620004c..86d10d1e 100644 --- a/.github/workflows/deployment-management-bot.yml +++ b/.github/workflows/deployment-management-bot.yml @@ -67,7 +67,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v3 with: - python-version: '3.9' + python-version: '3.10' - name: Install Bot Scripts Dependencies run: | pip install --upgrade pip @@ -170,7 +170,7 @@ jobs: - name: Init Git run: | - cd ${{ steps.municipality-slug.outputs.slug }} + cd ${{ steps.infra-meta.outputs.slug }} git config --global user.email "councildataproject@gmail.com" git config --global user.name "CouncilDataProjectServiceAccount" git init @@ -180,7 +180,7 @@ jobs: # Replace scraper with provided - name: Add cdp-scrapers as dependency - run: sed -i '21 i \ "cdp-scrapers[${{ steps.municipality-slug.outputs.python_slug }}]",' ${{ steps.municipality-slug.outputs.slug }}/python/setup.py + run: sed -i '21 i \ "cdp-scrapers[${{ steps.infra-meta.outputs.python_slug }}]",' ${{ steps.infra-meta.outputs.slug }}/python/setup.py # Get scraper path and update scraper function # The sed after param2 extract is to replace `/` with `\/` to escape the char @@ -209,7 +209,7 @@ jobs: .github/workflows/resources/base_legistar_scraper.py mv \ .github/workflows/resources/base_legistar_scraper.py \ - ${{ steps.municipality-slug.outputs.slug }}/python/cdp_${{ steps.municipality-slug.outputs.python_slug }}_backend/scraper.py + ${{ steps.infra-meta.outputs.slug }}/python/cdp_${{ steps.infra-meta.outputs.python_slug }}_backend/scraper.py # Use custom scraper - name: Add Custom Scraper @@ -221,19 +221,18 @@ jobs: .github/workflows/resources/custom_scraper.py mv \ .github/workflows/resources/custom_scraper.py \ - ${{ steps.municipality-slug.outputs.slug }}/python/cdp_${{ steps.municipality-slug.outputs.python_slug }}_backend/scraper.py + ${{ steps.infra-meta.outputs.slug }}/python/cdp_${{ steps.infra-meta.outputs.python_slug }}_backend/scraper.py # Commit scraper changes - name: Commit Scraper Dep and Usage run: | - cd ${{ steps.municipality-slug.outputs.slug }} + cd ${{ steps.infra-meta.outputs.slug }} git add -A git commit -m "Update scraper dependency and implementation" - name: Remove SETUP run: | - cd ${{ steps.municipality-slug.outputs.slug }} - rm -Rf SETUP/ + cd ${{ steps.infra-meta.outputs.slug }} git add -A git commit -m "Remove SETUP dir" @@ -280,7 +279,7 @@ jobs: ) run: | gh api \ - repos/CouncilDataProject/${{ steps.municipality-slug.outputs.slug }}/collaborators/$(jq -r '.maintainer_name' generation-options.json) \ + repos/CouncilDataProject/${{ steps.infra-meta.outputs.slug }}/collaborators/$(jq -r '.maintainer_name' generation-options.json) \ -X PUT \ -f permission='maintain' env: @@ -309,41 +308,17 @@ jobs: ##### Final Setup - * [ ] Run `make gen-key project=${{ steps.infrastructure-slug.outputs.slug }}` + * [ ] Copy the key generated from the prior `just init` process * [ ] Use the generated key as the [repository secret](${{ fromJSON(steps.cookiecutter-options.outputs.options).hosting_github_url }}/settings/secrets/actions) for `GOOGLE_CREDENTIALS` * [ ] Rerun the [infrastructure setup job](${{ fromJSON(steps.cookiecutter-options.outputs.options).hosting_github_url }}/actions/workflows/deploy-infra.yml), then: - * [ ] Run `make set-cors project=${{ steps.infrastructure-slug.outputs.slug }}` * [ ] Enable [Google Speech-to-Text Data Logging](https://console.cloud.google.com/apis/api/speech.googleapis.com/data_logging?project=${{ steps.infrastructure-slug.outputs.slug }}) - * [ ] Navigate to [Firebase Console](https://console.firebase.google.com), login to the CDP Google account, select the `${{ steps.infrastructure-slug.outputs.slug }}` Firebase project - * [ ] Navigate to "Firestore Database", select the "Rules" tab, paste the following in: - ``` - rules_version = '2'; - service cloud.firestore { - match /databases/{database}/documents { - match /{document=**} { - allow read; - } - } - } - ``` - * [ ] Navigate to "Storage", select the "Rules" tab, paste the following in: - ``` - rules_version = '2'; - service firebase.storage { - match /b/{bucket}/o { - match /{allPaths=**} { - allow read; - } - } - } - ``` * [ ] Enable [GitHub Pages](${{ fromJSON(steps.cookiecutter-options.outputs.options).hosting_github_url }}/settings/pages) * [ ] Comment on this issue with "Deployment Status - Complete" and the instance URL ##### Deletion Steps (Future Reference) * [ ] Delete the [instance repository](${{ fromJSON(steps.cookiecutter-options.outputs.options).hosting_github_url }}/settings) - * [ ] Run `make login` and login to the CDP gcloud and pulumi accounts - * [ ] Run `make destroy project=${{ steps.infrastructure-slug.outputs.slug }}` + * [ ] Run `just login` and login to the CDP gcloud + * [ ] Run `just destroy project=${{ steps.infrastructure-slug.outputs.slug }}` - More details on the `make` commands can be found in [cdp-backend](https://github.com/CouncilDataProject/cdp-backend/tree/main/dev-infrastructure). \ No newline at end of file + More details on the `just` commands can be found in [cdp-backend](https://github.com/CouncilDataProject/cdp-backend/tree/main/dev-infrastructure). \ No newline at end of file diff --git a/.github/workflows/instance-configuration-validation-bot.yml b/.github/workflows/instance-configuration-validation-bot.yml index d27f17d9..1159d7b4 100644 --- a/.github/workflows/instance-configuration-validation-bot.yml +++ b/.github/workflows/instance-configuration-validation-bot.yml @@ -83,7 +83,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v3 with: - python-version: '3.9' + python-version: '3.10' - name: Install Bot Scripts Dependencies run: | pip install --upgrade pip @@ -116,13 +116,15 @@ jobs: body="${body//$'\r'/'%0D'}" echo ::set-output name=body::$body - - name: Get Municipality Slug - id: municipality-slug + - name: Get Infrastructure Metadata + id: infra-meta run: | slug=$(jq -r '.municipality_slug' planned-cookiecutter.json) infra_slug=$(jq -r '.infrastructure_slug' planned-cookiecutter.json) + region=$(jq -r '.firestore_region' planned-cookiecutter.json) echo "::set-output name=slug::$slug" echo "::set-output name=infra_slug::$infra_slug" + echo "::set-output name=region::$region" - name: Find Validation Results Comment - Post Run uses: peter-evans/find-comment@v1 @@ -161,11 +163,13 @@ jobs: To proceed with the deployment process, please do the following: - * [ ] Run `make login` in cdp-backend/dev-infrastructure and login to the CDP gcloud and pulumi accounts - * [ ] Run `make init project=${{ steps.municipality-slug.outputs.infra_slug }}` in cdp-backend/dev-infrastructure + * [ ] Run `get_cdp_infrastructure_stack dev-infrastructure/` + * [ ] Run `just login` in cdp-backend/dev-infrastructure and login to the CDP gcloud account + * [ ] Run `just init ${{ steps.infra-meta.outputs.infra_slug }}` in cdp-backend/dev-infrastructure + * [ ] Run `just setup ${{ steps.infra-slug.outputs.region }}` in cdp-backend/dev-infrastructure * [ ] Comment "/cdp-deploy" on this issue and follow the rest of the instructions - More details on the `make` commands can be found in [cdp-backend](https://github.com/CouncilDataProject/cdp-backend/tree/main/dev-infrastructure). + More details on the `just` commands can be found in [cdp-backend](https://github.com/CouncilDataProject/cdp-backend/tree/main/dev-infrastructure). _This comment was written by a bot!_ diff --git a/.github/workflows/scripts/requirements.txt b/.github/workflows/scripts/requirements.txt index 43c00865..57f8a505 100644 --- a/.github/workflows/scripts/requirements.txt +++ b/.github/workflows/scripts/requirements.txt @@ -1,4 +1,4 @@ -cdp-backend[infrastructure]>=3.1.1 +cdp-backend>=3.1.1 cdp-scrapers~=0.4 cookiecutter~=1.7 requests~=2.25 \ No newline at end of file diff --git a/.github/workflows/scripts/validate_form.py b/.github/workflows/scripts/validate_form.py index 13713689..c28db41d 100644 --- a/.github/workflows/scripts/validate_form.py +++ b/.github/workflows/scripts/validate_form.py @@ -8,7 +8,7 @@ import sys import traceback -from cdp_backend.infrastructure.cdp_stack import GoverningBody +from cdp_backend.infrastructure import GoverningBody from cdp_scrapers.legistar_utils import LegistarScraper from cdp_scrapers import instances import requests diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 75b76f8e..de675dc4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: '3.10' - name: Setup Node uses: actions/setup-node@v1 with: diff --git a/README.md b/README.md index f699822b..b3cd35df 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,6 @@ you will need to install `cookiecutter` and use this template. Before you begin, please note that you will need to install or have available the following: - [gcloud](https://cloud.google.com/sdk/docs/install) -- [pulumi](https://www.pulumi.com/docs/get-started/install/) - [gsutil](https://cloud.google.com/storage/docs/gsutil_install) - [Python 3.6+](https://www.python.org/downloads/) (Any Python version greater than or equal to 3.6) @@ -109,7 +108,7 @@ see [Cookiecutter Repo Generation](#cookiecutter-repo-generation). The short summary of setup tasks remaining are: - The creation of a new GitHub repository for the instance. -- Logging in or creating accounts for Google Cloud and Pulumi. +- Logging in or creating an account for Google Cloud. - Initialize the basic infrastructure. - Assign a billing account to the created Google Cloud project. - Generate credentials for the Google Project for use in automated scripts. @@ -152,12 +151,6 @@ file storage, and (if needed) [speech-to-text](#speech-to-text) for transcriptio You can see more about the average monthly cost of running a CDP Instance in [Cost](#cost). -[Pulumi](#pulumi) is a service to manage and track infrastructure deployment state. -For those familiar with [Terraform](https://www.terraform.io/), -the two are quite similar. Pulumi's purpose is to ensure that we can move from -infrastructure upgrade to infrastructure upgrade without breaking anything -(and skipping things that don't need to be done). - For more details see [Cookiecutter Repo Generation](#cookiecutter-repo-generation). _After creating the repo, the following steps will have instructions and links specific_ _to your deployment in the generated repository's README._ @@ -186,7 +179,7 @@ cookiecutter gh:CouncilDataProject/cookiecutter-cdp-deployment ``` _Note: This will only create the basic repository._ -_You will still need to setup Google Cloud and Pulumi accounts._ +_You will still need to set up a Google Cloud account._ ### Google Cloud @@ -197,25 +190,6 @@ Google Cloud Platform (GCP). - Your deployment's generated files (audio clips, transcripts, etc.) will live in [Filestore](https://cloud.google.com/filestore). - When provided a video without closed captions, the audio from the provided video will be processed using [Speech-to-Text](https://cloud.google.com/speech-to-text). -All of these resources will be set up for you using [Pulumi](#pulumi) but -you will need to create both Google Cloud and Pulumi accounts. More information -on these services and the steps for account creation can be found in the -generated repository's README. - -### Pulumi - -Pulumi allows CDP developers and Instance maintainers to create, deploy, and manage -infrastructure on any cloud using familiar programming languages and tools. -It additionally, stores and tracks the _state_ of the CDP infrastructure, -i.e. how many and which file storage, database, and processing resources are available. - -For CDP Instance maintainers, this simply means, the infrastructure management is -packaged up as a part of `cdp-backend`, _and_ the infrastructure will never be -incompatible with the pipelines as they are versioned together. - -Pulumi is free, and generally, you as an instance maintainer should never have to -interact with Pulumi other than during the CDP Instance creation and setup process. - ## Cost CDP was created and maintained by a group of people working on it in their free time. @@ -229,7 +203,6 @@ Free Resources and Infrastructure: - Event Processing (GitHub Actions) - Event and Legislation Indexing (GitHub Actions) - Web Hosting (GitHub Pages) -- Infrastructure State Management (Pulumi) The backend resources and processing are the only real costs and depend on usage. The more users that use your web application, the more the database and diff --git a/{{ cookiecutter.hosting_github_repo_name }}/.github/dependabot.yml b/{{ cookiecutter.hosting_github_repo_name }}/.github/dependabot.yml index 178b2340..2bd76d7a 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/.github/dependabot.yml +++ b/{{ cookiecutter.hosting_github_repo_name }}/.github/dependabot.yml @@ -1,12 +1,5 @@ version: 2 updates: - - package-ecosystem: "pip" - directory: "/infra" - schedule: - interval: "daily" - allow: - - dependency-name: "cdp-backend" - - package-ecosystem: "pip" directory: "/python" schedule: diff --git a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/build-main.yml b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/build-main.yml index 1896fe01..cf4d9cfb 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/build-main.yml +++ b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/build-main.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: '3.10' - name: Install Packages run: | diff --git a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/check-pr.yml b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/check-pr.yml index 60c6d965..baa132f6 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/check-pr.yml +++ b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/check-pr.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: '3.10' - name: Install Packages run: | diff --git a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/deploy-infra.yml b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/deploy-infra.yml index 0539c743..cc5301d2 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/deploy-infra.yml +++ b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/deploy-infra.yml @@ -17,20 +17,43 @@ jobs: steps: - uses: actions/checkout@v2 + + # Install OS Deps - uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: '3.10' + - uses: extractions/setup-just@v1 + env: + GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} + - name: Install firebase-cli + run: | + curl -sL https://firebase.tools | bash + + # Install cdp-backend - name: Install Dependencies run: | - cd infra/ - pip install -r requirements.txt - - name: Run Infrastructure Deploy - uses: pulumi/actions@v3 + cd python/ + pip install . + + # Setup gcloud + - uses: 'google-github-actions/auth@v0' with: - command: up - parallel: 4 - stack-name: {{ cookiecutter.infrastructure_slug }} - work-dir: infra/ + credentials_json: {% raw %}${{ secrets.GOOGLE_CREDENTIALS }}{% endraw %} + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@v0 + + # Generate / copy infrastructure files + - name: Copy and Generate Infrastructure Files + run: | + get_cdp_infrastructure_stack infrastructure + + # Run infrastructure deploy + - name: Run Infrastructure Deploy + run: | + cd infrastructure + echo "$GOOGLE_CREDENTIALS" > google-creds.json + export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/google-creds.json + just deploy {{ cookiecutter.infrastructure_slug }} ../cookiecutter.yaml env: + FIREBASE_TOKEN: {% raw %}${{ secrets.FIREBASE_TOKEN }}{% endraw %} GOOGLE_CREDENTIALS: {% raw %}${{ secrets.GOOGLE_CREDENTIALS }}{% endraw %} - PULUMI_ACCESS_TOKEN: {% raw %}${{ secrets.PULUMI_ACCESS_TOKEN }}{% endraw %} diff --git a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/deploy-web.yml b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/deploy-web.yml index 915b9189..a971ff2e 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/deploy-web.yml +++ b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/deploy-web.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Setup Node - name: Setup Node @@ -35,10 +35,7 @@ jobs: npm run build # Deploy Web - - name: Deploy Web - uses: JamesIves/github-pages-deploy-action@3.7.1 - with: - GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} - BASE_BRANCH: main # The branch the action should deploy from. - BRANCH: gh-pages # The branch the action should deploy to. - FOLDER: web/build/ # The folder the action should deploy. \ No newline at end of file + - name: Publish Docs + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: web/build/ \ No newline at end of file diff --git a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/event-gather-pipeline.yml b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/event-gather-pipeline.yml index 7f4165b1..156e5ef1 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/event-gather-pipeline.yml +++ b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/event-gather-pipeline.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: '3.10' - name: Install Packages run: | @@ -40,7 +40,7 @@ jobs: - name: Install Python Dependencies run: | cd python/ - pip install . + pip install .[pipeline] - name: Setup gcloud uses: google-github-actions/setup-gcloud@v0 diff --git a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/event-index-pipeline.yml b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/event-index-pipeline.yml index de8ec021..08d75192 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/event-index-pipeline.yml +++ b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/event-index-pipeline.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: '3.10' # Setup GCloud / Creds - name: Setup gcloud @@ -53,7 +53,7 @@ jobs: - name: Install Python Dependencies run: | cd python/ - pip install . + pip install .[pipeline] # Index - name: Index Events ${{ matrix.n-gram }}-grams @@ -83,7 +83,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: '3.10' # Process - name: Combine Chunks @@ -107,7 +107,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: '3.10' # Setup GCloud / Creds - name: Setup gcloud diff --git a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/process-special-event.yml b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/process-special-event.yml index f38b8b39..508a29de 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/process-special-event.yml +++ b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/process-special-event.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: '3.10' - name: Install Packages run: | @@ -29,7 +29,7 @@ jobs: - name: Install Python Dependencies run: | cd python/ - pip install . + pip install .[pipeline] - name: Setup gcloud uses: google-github-actions/setup-gcloud@v0 diff --git a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/run-script.yml b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/run-script.yml index 36ed6495..0aedef64 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/run-script.yml +++ b/{{ cookiecutter.hosting_github_repo_name }}/.github/workflows/run-script.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: '3.10' - name: Install Packages run: | @@ -28,7 +28,7 @@ jobs: - name: Install Python Dependencies run: | cd python/ - pip install . + pip install .[pipeline] - name: Setup gcloud uses: google-github-actions/setup-gcloud@v0 diff --git a/{{ cookiecutter.hosting_github_repo_name }}/Justfile b/{{ cookiecutter.hosting_github_repo_name }}/Justfile new file mode 100644 index 00000000..f532c941 --- /dev/null +++ b/{{ cookiecutter.hosting_github_repo_name }}/Justfile @@ -0,0 +1,12 @@ +# list all available commands +default: + just --list + +# update this repo using latest cookiecutter-py-package +update-from-cookiecutter: + pip install cookiecutter + cookiecutter gh:CouncilDataProject/cookiecutter-cdp-deployment \ + --config-file cookiecutter.yaml \ + --no-input \ + --overwrite-if-exists \ + --output-dir .. \ No newline at end of file diff --git a/{{ cookiecutter.hosting_github_repo_name }}/Makefile b/{{ cookiecutter.hosting_github_repo_name }}/Makefile deleted file mode 100644 index 68eeb8ff..00000000 --- a/{{ cookiecutter.hosting_github_repo_name }}/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -.PHONY: clean build gen-docs docs help -.DEFAULT_GOAL := help - -define PRINT_HELP_PYSCRIPT -import re, sys - -for line in sys.stdin: - match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line) - if match: - target, help = match.groups() - print("%-20s: %s" % (target, help)) -endef -export PRINT_HELP_PYSCRIPT - -help: - @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) - -update-from-cookiecutter: ## update this repo using latest cookiecutter-cdp-deployment - cookiecutter gh:CouncilDataProject/cookiecutter-cdp-deployment --config-file cookiecutter.yaml --no-input --overwrite-if-exists --output-dir .. \ No newline at end of file diff --git a/{{ cookiecutter.hosting_github_repo_name }}/SETUP/Makefile b/{{ cookiecutter.hosting_github_repo_name }}/SETUP/Makefile deleted file mode 100644 index 755ef916..00000000 --- a/{{ cookiecutter.hosting_github_repo_name }}/SETUP/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -.PHONY: help login init set-cors destroy gen-key -.DEFAULT_GOAL := help - -define PRINT_HELP_PYSCRIPT -import re, sys - -for line in sys.stdin: - match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line) - if match: - target, help = match.groups() - print("%-20s %s" % (target, help)) -endef -export PRINT_HELP_PYSCRIPT - -help: - @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) - -login: ## Run GCloud and Pulumi logins - pulumi logout - pulumi login - gcloud auth login - gcloud auth application-default login - -init: ## Create google project and pulumi stack - gcloud projects create {{ cookiecutter.infrastructure_slug }} --set-as-default - pulumi stack init {{ cookiecutter.infrastructure_slug }} - -set-cors: ## Set cors for the bucket - gsutil cors set cors.json gs://{{ cookiecutter.infrastructure_slug }}.appspot.com/ - -destroy: ## Fully teardown Pulumi and GCloud - pulumi stack rm {{ cookiecutter.infrastructure_slug }} --force - gcloud projects delete {{ cookiecutter.infrastructure_slug }} - rm -f .keys/{{ cookiecutter.infrastructure_slug }}.json - -gen-key: ## Generate a service account JSON - mkdir .keys/ -p - gcloud iam service-accounts create {{ cookiecutter.infrastructure_slug }} \ - --description="CDP Dev Service Account for $(USER)" \ - --display-name="{{ cookiecutter.infrastructure_slug }}" - gcloud projects add-iam-policy-binding {{ cookiecutter.infrastructure_slug }} \ - --member="serviceAccount:{{ cookiecutter.infrastructure_slug }}@{{ cookiecutter.infrastructure_slug }}.iam.gserviceaccount.com" \ - --role="roles/owner" - gcloud iam service-accounts keys create .keys/{{ cookiecutter.infrastructure_slug }}.json \ - --iam-account "{{ cookiecutter.infrastructure_slug }}@{{ cookiecutter.infrastructure_slug }}.iam.gserviceaccount.com" \ No newline at end of file diff --git a/{{ cookiecutter.hosting_github_repo_name }}/SETUP/Pulumi.yaml b/{{ cookiecutter.hosting_github_repo_name }}/SETUP/Pulumi.yaml deleted file mode 100644 index f74d8a8c..00000000 --- a/{{ cookiecutter.hosting_github_repo_name }}/SETUP/Pulumi.yaml +++ /dev/null @@ -1,3 +0,0 @@ -name: cdp-infrastructure -description: CDP Pulumi stack -runtime: python diff --git a/{{ cookiecutter.hosting_github_repo_name }}/SETUP/README.md b/{{ cookiecutter.hosting_github_repo_name }}/SETUP/README.md index 5e046d69..eea9aaf2 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/SETUP/README.md +++ b/{{ cookiecutter.hosting_github_repo_name }}/SETUP/README.md @@ -7,8 +7,8 @@ This document outlines the steps necessary to finish initializing this CDP Insta Install the command line tools that will help shorten the setup process 1. Install [gcloud](https://cloud.google.com/sdk/docs/install) -2. Install [pulumi](https://www.pulumi.com/docs/get-started/install/) -3. Install [gsutil](https://cloud.google.com/storage/docs/gsutil_install) +2. Install [gsutil](https://cloud.google.com/storage/docs/gsutil_install) +3. Install [firebase-tools](https://firebase.google.com/docs/cli/) ## Initial Repository Setup @@ -24,17 +24,30 @@ There are additional tasks required after generating this repository. - Do not initialize with any of the extra options - Click "Create repository". -1. Login to both Google Cloud and Pulumi. +1. Install `cdp-backend`. - **IMPORTANT:** During this process Pulumi will provide a token to use for authentication. - **Keep this token available for use in a later step.** + This step should be ran while within the `SETUP` directory (`cd SETUP`). + + ```bash + pip install ../python/ + ``` + +1. Get the infrastructure files. + + This step should be ran while within the `SETUP` directory (`cd SETUP`). + + ```bash + get_cdp_infrastructure_stack . + ``` + +1. Login to Google Cloud. This step should be run while within the `SETUP` directory (`cd SETUP`). Run: ```bash - make login + just login ``` 1. Initialize the basic project infrastructure. @@ -44,7 +57,17 @@ There are additional tasks required after generating this repository. Run: ```bash - make init + just init {{ cookiecutter.infrastructure_slug }} + ``` + + This step will also generate a Google Service Account JSON file and store it + in a directory called `.keys` in the root of this repository. + +1. Set or update the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the + path to the key that was just generated. + + ```bash + export GOOGLE_APPLICATION_CREDENTIALS="INSERT/PATH/HERE" ``` 1. Create (or re-use) a @@ -53,33 +76,36 @@ There are additional tasks required after generating this repository. For more details on the cost of maintaining a CDP Instance, see our [estimated cost breakdown](https://github.com/CouncilDataProject/cookiecutter-cdp-deployment#cost). -1. Generate a Google Service Account JSON Key for your Google Cloud Project. - - This will create a directory called `.keys` within this `SETUP` directory and - add a file called `{{ cookiecutter.infrastructure_slug }}.json` to it - (i.e. `.keys/{{ cookiecutter.infrastructure_slug }})`. This file will be used later on. - - Run: +1. Generate a Firebase CI token. ```bash - make gen-key + firebase login:ci ``` -1. Attach the Pulumi Access Token and the - Google Service Account JSON as GitHub Repository Secrets. - - 1. Pulumi Access Token -- Create a [new secret]({{ cookiecutter.hosting_github_url }}/settings/secrets/actions/new) + Save this token for the next step! - - Set the name to: **PULUMI_ACCESS_TOKEN** - - Set the value to: The token you kept from step #2 - - Click "Add secret" +1. Attach the Google Service Account JSON as GitHub Repository Secret. - 2. Google Service Account JSON -- Create a [new secret]({{ cookiecutter.hosting_github_url }}/settings/secrets/actions/new) + 1. Create a [new secret]({{ cookiecutter.hosting_github_url }}/settings/secrets/actions/new) - Set the name to: **GOOGLE_CREDENTIALS** - Set the value to: the contents of the file `.keys/{{ cookiecutter.infrastructure_slug }}.json` - Click "Add secret" + 2. Create a [new secret]({{ cookiecutter.hosting_github_url }}/settings/secrets/actions/new) + + - Set the name to: **FIREBASE_TOKEN** + - Set the value to: the value of the token you created in the prior step. + - Click "Add secret" + +1. Build the basic project infrastructure. + + This step should be run while within the `SETUP` directory (`cd SETUP`) + + ```bash + just setup {{ cookiecutter.firestore_region }} + ``` + 1. Initialize and push the local repository to GitHub. This step should be run while within the base directory of the repository (`cd ..`). @@ -123,18 +149,6 @@ There are additional tasks required after generating this repository. - Set the folder to: `/ (root)` - Click "Save" -1. Once the - ["Infrastructure" GitHub Action Successfully Completes]({{ cookiecutter.hosting_github_url }}/actions?query=workflow%3A%22Infrastructure%22) - set the CORS policy for your Storage Bucket. - - This step should be run while within the `SETUP` directory (`cd SETUP`) - - Run: - - ```bash - make set-cors - ``` - 1. Once the ["Infrastructure" GitHub Action Successfully Completes]({{ cookiecutter.hosting_github_url }}/actions?query=workflow%3A%22Infrastructure%22) enable data-logging for the Google Speech-to-Text service. @@ -144,37 +158,6 @@ There are additional tasks required after generating this repository. If the above direct link doesn't work, follow the instructions from [Google Documentation](https://cloud.google.com/speech-to-text/docs/enable-data-logging). -1. Once the - ["Infrastructure" GitHub Action Successfully Completes]({{ cookiecutter.hosting_github_url }}/actions?query=workflow%3A%22Infrastructure%22) - configure Firebase Security Rules. - - - Navigate to [Firebase Console](https://console.firebase.google.com), - login to the Google Account you used during step #2, select the `{{ cookiecutter.infrastructure_slug }}` Firebase project - - Navigate to "Firestore Database", select the "Rules" tab, paste the following in: - ``` - rules_version = '2'; - service cloud.firestore { - match /databases/{database}/documents { - match /{document=**} { - allow read; - } - } - } - ``` - - Click "Publish" - - Navigate to "Storage", select the "Rules" tab, paste the following in: - ``` - rules_version = '2'; - service firebase.storage { - match /b/{bucket}/o { - match /{allPaths=**} { - allow read; - } - } - } - ``` - - Click "Publish" - **If all steps complete successful your web application will be viewable at: {{ cookiecutter.hosting_web_app_address }}** ## Data Gathering Setup diff --git a/{{ cookiecutter.hosting_github_repo_name }}/SETUP/cors.json b/{{ cookiecutter.hosting_github_repo_name }}/SETUP/cors.json deleted file mode 100644 index f4521b13..00000000 --- a/{{ cookiecutter.hosting_github_repo_name }}/SETUP/cors.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "origin": ["*"], - "method": ["GET"], - "maxAgeSeconds": 3600 - } -] diff --git a/{{ cookiecutter.hosting_github_repo_name }}/admin-docs/updating-to-new-cookiecutter-releases.md b/{{ cookiecutter.hosting_github_repo_name }}/admin-docs/updating-to-new-cookiecutter-releases.md index efc700e2..95d9a1a4 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/admin-docs/updating-to-new-cookiecutter-releases.md +++ b/{{ cookiecutter.hosting_github_repo_name }}/admin-docs/updating-to-new-cookiecutter-releases.md @@ -32,19 +32,7 @@ To do so, you should feel comfortable with the command line and git. - `pip install cookiecutter` -3. _Partially_ run `cookiecutter`: - - We simply want to download the latest version of this cookiecutter template, - to do so: - - - `cookiecutter gh:CouncilDataProject/cookiecutter-cdp-deployment` - - Re-download the latest version and then when prompted for parameter input, - escape or exit the process (`control+c`). - - ![screenshot of terminal after cookiecutter interrupt](./resources/cookiecutter-interrupt.png) - -4. Update your repo using the latest cookiecutter version: +3. Update your repo using the latest cookiecutter version: This will pull in the current cookiecutter updates as changes to the current repository. @@ -55,9 +43,11 @@ To do so, you should feel comfortable with the command line and git. Then run: - - `make update-from-cookiecutter` + - `just update-from-cookiecutter` + + **Note: you may need to install [just](https://github.com/casey/just#packages).** -5. Select the desired changes to commit: +4. Select the desired changes to commit: In an editor or in the terminal you can now review the changes to commit. @@ -67,13 +57,13 @@ To do so, you should feel comfortable with the command line and git. - `git add {some-file}` - OR `git restore {some-file}` - ![screenshot of make update and resulting git status](./resources/update-and-git-status.png) + ![screenshot of just update and resulting git status](./resources/update-and-git-status.png) In VS Code: ![screenshot of source control pane in vs code](./resources/vs-code-status.png) -6. Commit and push: +5. Commit and push: With the desired changes selected, commit and push to update your repository. It is recommended to include the cookiecutter version in your commit message. diff --git a/{{ cookiecutter.hosting_github_repo_name }}/infra/Pulumi.yaml b/{{ cookiecutter.hosting_github_repo_name }}/infra/Pulumi.yaml deleted file mode 100644 index b10b761e..00000000 --- a/{{ cookiecutter.hosting_github_repo_name }}/infra/Pulumi.yaml +++ /dev/null @@ -1,3 +0,0 @@ -name: cdp-infrastructure -description: CouncilDataProject deployments -runtime: python diff --git a/{{ cookiecutter.hosting_github_repo_name }}/infra/__main__.py b/{{ cookiecutter.hosting_github_repo_name }}/infra/__main__.py deleted file mode 100644 index 75208494..00000000 --- a/{{ cookiecutter.hosting_github_repo_name }}/infra/__main__.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from cdp_backend.infrastructure import CDPStack -from pulumi import export - -############################################################################### - -cdp_stack = CDPStack( - gcp_project_id="{{ cookiecutter.infrastructure_slug }}", - municipality_name="{{ cookiecutter.municipality }}", - firestore_location="{{ cookiecutter.firestore_region }}", - hosting_github_url="{{ cookiecutter.hosting_github_url }}", - hosting_web_app_address="{{ cookiecutter.hosting_web_app_address }}", - governing_body="{{ cookiecutter.governing_body_type }}", -) - -export("firestore_address", cdp_stack.firestore_app.app_id) -export("gcp_bucket_name", cdp_stack.firestore_app.default_bucket) diff --git a/{{ cookiecutter.hosting_github_repo_name }}/infra/requirements.txt b/{{ cookiecutter.hosting_github_repo_name }}/infra/requirements.txt deleted file mode 100644 index b09e6aad..00000000 --- a/{{ cookiecutter.hosting_github_repo_name }}/infra/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -cdp-backend[infrastructure]==3.1.1 -pulumi diff --git a/{{ cookiecutter.hosting_github_repo_name }}/python/setup.py b/{{ cookiecutter.hosting_github_repo_name }}/python/setup.py index c3694fea..af03f8c9 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/python/setup.py +++ b/{{ cookiecutter.hosting_github_repo_name }}/python/setup.py @@ -5,10 +5,20 @@ from setuptools import find_packages, setup +requirements = [ + "cdp-backend==3.2.0.dev0", +] + +pipeline_requirements = [ + "cdp-backend==3.2.0.dev0", +] + + test_requirements = [ "black>=19.10b0", "flake8>=3.8.3", "flake8-debugger>=3.2.1", + *pipeline_requirements, ] dev_requirements = [ @@ -16,15 +26,13 @@ "wheel>=0.34.2", ] -requirements = [ - "cdp-backend[pipeline]==3.1.1", -] - extra_requirements = { + "pipeline": pipeline_requirements, "test": test_requirements, "dev": dev_requirements, "all": [ *requirements, + *pipeline_requirements, *dev_requirements, ], } @@ -36,7 +44,7 @@ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", - "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", ], description="Package containing the gather functions for Example.", install_requires=requirements, @@ -46,7 +54,7 @@ keywords="civic technology, open government", name="cdp-{{ cookiecutter.python_municipality_slug }}-backend", packages=find_packages(exclude=["tests", "*.tests", "*.tests.*"]), - python_requires=">=3.9", + python_requires=">=3.10", tests_require=test_requirements, extras_require=extra_requirements, url="{{ cookiecutter.hosting_github_url }}", From a56dfbe94f375f31b270db310d46a4af2e0f91d3 Mon Sep 17 00:00:00 2001 From: Eva Maxfield Brown Date: Wed, 17 Aug 2022 16:28:33 -0700 Subject: [PATCH 2/3] Minor fixes --- .github/workflows/deployment-management-bot.yml | 14 +++++++------- .../instance-configuration-validation-bot.yml | 2 +- .github/workflows/scripts/requirements.txt | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deployment-management-bot.yml b/.github/workflows/deployment-management-bot.yml index 86d10d1e..531fc52d 100644 --- a/.github/workflows/deployment-management-bot.yml +++ b/.github/workflows/deployment-management-bot.yml @@ -170,7 +170,7 @@ jobs: - name: Init Git run: | - cd ${{ steps.infra-meta.outputs.slug }} + cd ${{ steps.municipality-slug.outputs.slug }} git config --global user.email "councildataproject@gmail.com" git config --global user.name "CouncilDataProjectServiceAccount" git init @@ -180,7 +180,7 @@ jobs: # Replace scraper with provided - name: Add cdp-scrapers as dependency - run: sed -i '21 i \ "cdp-scrapers[${{ steps.infra-meta.outputs.python_slug }}]",' ${{ steps.infra-meta.outputs.slug }}/python/setup.py + run: sed -i '21 i \ "cdp-scrapers[${{ steps.municipality-slug.outputs.python_slug }}]",' ${{ steps.municipality-slug.outputs.slug }}/python/setup.py # Get scraper path and update scraper function # The sed after param2 extract is to replace `/` with `\/` to escape the char @@ -209,7 +209,7 @@ jobs: .github/workflows/resources/base_legistar_scraper.py mv \ .github/workflows/resources/base_legistar_scraper.py \ - ${{ steps.infra-meta.outputs.slug }}/python/cdp_${{ steps.infra-meta.outputs.python_slug }}_backend/scraper.py + ${{ steps.municipality-slug.outputs.slug }}/python/cdp_${{ steps.municipality-slug.outputs.python_slug }}_backend/scraper.py # Use custom scraper - name: Add Custom Scraper @@ -221,18 +221,18 @@ jobs: .github/workflows/resources/custom_scraper.py mv \ .github/workflows/resources/custom_scraper.py \ - ${{ steps.infra-meta.outputs.slug }}/python/cdp_${{ steps.infra-meta.outputs.python_slug }}_backend/scraper.py + ${{ steps.municipality-slug.outputs.slug }}/python/cdp_${{ steps.municipality-slug.outputs.python_slug }}_backend/scraper.py # Commit scraper changes - name: Commit Scraper Dep and Usage run: | - cd ${{ steps.infra-meta.outputs.slug }} + cd ${{ steps.municipality-slug.outputs.slug }} git add -A git commit -m "Update scraper dependency and implementation" - name: Remove SETUP run: | - cd ${{ steps.infra-meta.outputs.slug }} + cd ${{ steps.municipality-slug.outputs.slug }} git add -A git commit -m "Remove SETUP dir" @@ -279,7 +279,7 @@ jobs: ) run: | gh api \ - repos/CouncilDataProject/${{ steps.infra-meta.outputs.slug }}/collaborators/$(jq -r '.maintainer_name' generation-options.json) \ + repos/CouncilDataProject/${{ steps.municipality-slug.outputs.slug }}/collaborators/$(jq -r '.maintainer_name' generation-options.json) \ -X PUT \ -f permission='maintain' env: diff --git a/.github/workflows/instance-configuration-validation-bot.yml b/.github/workflows/instance-configuration-validation-bot.yml index 1159d7b4..7d8ea9ab 100644 --- a/.github/workflows/instance-configuration-validation-bot.yml +++ b/.github/workflows/instance-configuration-validation-bot.yml @@ -166,7 +166,7 @@ jobs: * [ ] Run `get_cdp_infrastructure_stack dev-infrastructure/` * [ ] Run `just login` in cdp-backend/dev-infrastructure and login to the CDP gcloud account * [ ] Run `just init ${{ steps.infra-meta.outputs.infra_slug }}` in cdp-backend/dev-infrastructure - * [ ] Run `just setup ${{ steps.infra-slug.outputs.region }}` in cdp-backend/dev-infrastructure + * [ ] Run `just setup ${{ steps.infra-meta.outputs.region }}` in cdp-backend/dev-infrastructure * [ ] Comment "/cdp-deploy" on this issue and follow the rest of the instructions More details on the `just` commands can be found in [cdp-backend](https://github.com/CouncilDataProject/cdp-backend/tree/main/dev-infrastructure). diff --git a/.github/workflows/scripts/requirements.txt b/.github/workflows/scripts/requirements.txt index 57f8a505..b4755e3f 100644 --- a/.github/workflows/scripts/requirements.txt +++ b/.github/workflows/scripts/requirements.txt @@ -1,4 +1,4 @@ -cdp-backend>=3.1.1 +cdp-backend>=3.2.0.dev0 cdp-scrapers~=0.4 cookiecutter~=1.7 requests~=2.25 \ No newline at end of file From a014d638bcc4bd9e427972b5fa2a1fe4ded9838e Mon Sep 17 00:00:00 2001 From: Eva Maxfield Brown Date: Wed, 17 Aug 2022 16:31:10 -0700 Subject: [PATCH 3/3] More dependabot configs --- .github/dependabot.yml | 8 ++++++-- .../.github/dependabot.yml | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7e55e20d..70220489 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,9 +1,9 @@ version: 2 updates: - package-ecosystem: "github-actions" - directory: "/.github" + directory: "/" schedule: - interval: "monthly" + interval: "daily" commit-message: prefix: "ci(dependabot):" @@ -13,6 +13,8 @@ updates: interval: "daily" allow: - dependency-name: "cdp-backend" + commit-message: + prefix: "ci(dependabot):" - package-ecosystem: "npm" directory: "/" @@ -20,3 +22,5 @@ updates: interval: "daily" allow: - dependency-name: "@councildataproject/cdp-frontend" + commit-message: + prefix: "ci(dependabot):" diff --git a/{{ cookiecutter.hosting_github_repo_name }}/.github/dependabot.yml b/{{ cookiecutter.hosting_github_repo_name }}/.github/dependabot.yml index 2bd76d7a..31cbc8ff 100644 --- a/{{ cookiecutter.hosting_github_repo_name }}/.github/dependabot.yml +++ b/{{ cookiecutter.hosting_github_repo_name }}/.github/dependabot.yml @@ -6,6 +6,8 @@ updates: interval: "daily" allow: - dependency-name: "cdp-backend" + commit-message: + prefix: "ci(dependabot):" - package-ecosystem: "npm" directory: "/web" @@ -13,3 +15,5 @@ updates: interval: "daily" allow: - dependency-name: "@councildataproject/cdp-frontend" + commit-message: + prefix: "ci(dependabot):"