-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/gcp-secret-env-file
- Loading branch information
Showing
23 changed files
with
306 additions
and
505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Sync | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: Destination environment | ||
required: true | ||
type: choice | ||
options: | ||
- staging | ||
- development | ||
|
||
jobs: | ||
sync: | ||
name: Sync | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
if: contains('AldemirLucas vncsna', github.actor) | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Import secrets | ||
id: import_secrets | ||
uses: hashicorp/[email protected] | ||
with: | ||
url: https://vault.basedosdados.org | ||
token: ${{ secrets.VAULT_TOKEN }} | ||
secrets: | | ||
secret/data/gcp_credentials/basedosdados-dev GCP_PROJECT_ID | GCP_PROJECT_ID ; | ||
secret/data/gcp_credentials/basedosdados-dev GH_ACTIONS_SA | GCP_SA ; | ||
secret/data/gcp_credentials/basedosdados-dev GKE_CLUSTER_NAME | GKE_CLUSTER_NAME ; | ||
secret/data/gcp_credentials/basedosdados-dev GKE_CLUSTER_ZONE | GKE_CLUSTER_ZONE ; | ||
- name: Authenticate GCP | ||
id: auth | ||
uses: google-github-actions/auth@v1 | ||
with: | ||
credentials_json: ${{ steps.import_secrets.outputs.GCP_SA }} | ||
|
||
- name: Set up GCP SDK | ||
uses: google-github-actions/setup-gcloud@v1 | ||
with: | ||
version: ">= 363.0.0" | ||
|
||
- name: Install kubectl | ||
run: | | ||
sudo apt-get update --quiet | ||
sudo apt-get install --yes apt-transport-https ca-certificates curl | ||
curl -LO https://dl.k8s.io/release/v1.24.15/bin/linux/amd64/kubectl | ||
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | ||
- name: Set up kubectl | ||
run: | | ||
gcloud components install gke-gcloud-auth-plugin | ||
gcloud container clusters get-credentials\ | ||
${{ steps.import_secrets.outputs.GKE_CLUSTER_NAME }}\ | ||
--zone ${{ steps.import_secrets.outputs.GKE_CLUSTER_ZONE }} | ||
kubectl config set-context --current --namespace=website | ||
- name: Sync databases | ||
run: | | ||
./scripts/sync.sh ${{ inputs.environment }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
basedosdados_api/api/v1/templates/admin/edit_inline/custom_coverage_model_inline.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.http import HttpResponseRedirect | ||
from django.urls import path | ||
from django.views.decorators.csrf import csrf_exempt | ||
from graphene_file_upload.django import FileUploadGraphQLView | ||
|
||
|
||
def redirect_to_v1(request): | ||
return HttpResponseRedirect("/api/v1/") | ||
|
||
|
||
def redirect_to_v1_graphql(request): | ||
return HttpResponseRedirect("/api/v1/graphql") | ||
|
||
|
||
urlpatterns = [ | ||
path("", redirect_to_v1), | ||
path("v1/", redirect_to_v1_graphql), | ||
path( | ||
"v1/graphql", | ||
csrf_exempt(FileUploadGraphQLView.as_view(graphiql=True)), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.contrib import admin # noqa | ||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
from djstripe.apps import DjstripeAppConfig | ||
|
||
|
||
class PaymentsConfig(DjstripeAppConfig): | ||
verbose_name = "Stripe" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.db import models # noqa | ||
|
||
# Create your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.test import TestCase # noqa | ||
|
||
# Create your tests here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.urls import include, path | ||
|
||
urlpatterns = [ | ||
path("", include("djstripe.urls", namespace="djstripe")), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.shortcuts import render # noqa | ||
|
||
# Create your views here. |
Oops, something went wrong.