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

Develop #15

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
a105253
Revert "Revert "[F] Investigation structure""
alexgoff May 23, 2022
883d5b6
Added configs to manually deploy to GAE
ericdrosas87 Oct 18, 2022
dc41d94
Added Github Actions workflow files
ericdrosas87 Oct 20, 2022
4249c3d
Dummy commit to retrigger build with new Github
ericdrosas87 Oct 20, 2022
5441643
[C] Incorporate craft-cms-template changes
Apr 10, 2023
3bfd420
Added PhpStorm config folder to .gitignores
ericdrosas87 Apr 24, 2023
7e31895
Updated text in workflow
ericdrosas87 Apr 24, 2023
61b5dae
[C] Install GraphQL Authentication plugin
kylepratuch Jun 15, 2023
6250e8b
[F] Configure GQL auth plugin and configure user groups
kylepratuch Jun 15, 2023
da1710e
[C] Enable public user registration
kylepratuch Jun 21, 2023
564cfe3
[C] Add craft/generator package as dev dependency
kylepratuch Jun 21, 2023
3dbd68e
[F] Reconfigure user groups
kylepratuch Jun 21, 2023
0af914d
[F] Configure user group schemas
kylepratuch Jun 21, 2023
3448159
[C] Fix group/schema configuration
kylepratuch Jun 22, 2023
bb52300
[C] Add .env for auth/email environment variables
kylepratuch Jun 26, 2023
b1966ab
[C] Add acct management route env vars
kylepratuch Jun 26, 2023
059d10a
[F] Add auth email vars
dananjohnson Jun 29, 2023
77aca02
[C] Add Facebook, Google app creds
kylepratuch Jul 13, 2023
87ee481
[F] Add Investigation entry types
kylepratuch Jun 28, 2023
19cc684
[C] Remove redundant key in compose
kylepratuch Jun 28, 2023
c11a524
[F] Set up assets volume
kylepratuch Jun 28, 2023
faa3e77
[F] Add supporting fields for widgets
kylepratuch Jun 28, 2023
fa2a1e0
[F] Add preliminary widget configuration
kylepratuch Jul 7, 2023
a756410
[F] Configure assets for widgets
kylepratuch Jul 7, 2023
ae15576
[C] Add Investigations to Next Builds
kylepratuch Jul 13, 2023
acc7dc9
[F] Add some fields to investigation entry
kylepratuch Jul 13, 2023
4d4d019
[C] Add investigation entries to public schema
dananjohnson Aug 7, 2023
5b1815e
[F] TwoColContainer has cols with child ContentBlocks
Sep 7, 2023
ab3e49d
[C] Update graphQL auth schema ids in project.config
Sep 7, 2023
b7c3a80
[F] Add Canto image support + InvestigationParent Image
Sep 11, 2023
aef2ac2
[F] Add Question entry type
kylepratuch Jul 19, 2023
64c867f
[C] Add stubbed investigations module
kylepratuch Jul 19, 2023
e8d3b0d
[C] Update public schema
kylepratuch Jul 19, 2023
1f9c893
[F] Add Answer element
kylepratuch Jul 20, 2023
9449b1d
[F] Add question block
kylepratuch Jul 25, 2023
db7c0a0
[F] Add AnswerQuery element class
kylepratuch Jul 25, 2023
323ab0d
[C] Update public schema
kylepratuch Jul 26, 2023
cafe805
[F] Add GQL support for Answer element
kylepratuch Jul 26, 2023
de88448
[F] Add investigationId column to answers table
kylepratuch Aug 10, 2023
ac29087
[F] Add saveAnswer GQL mutation
kylepratuch Aug 11, 2023
27a06cd
[F] Implement GQL schema components for Answers
kylepratuch Sep 6, 2023
df51702
[C] Code cleanup
kylepratuch Sep 12, 2023
4015958
[C] Match schema access to certain content
dananjohnson Sep 18, 2023
3d691a8
[F] Image Content Block
Sep 12, 2023
6eef28f
[C] Update AuthQL plugin
Sep 12, 2023
e1c50ff
[F] ImageBlock uses DAM Assets + composer updates
Sep 12, 2023
22171ff
[C] Update DAM plugin version to latest
Sep 19, 2023
1bd8feb
Added worklows to int
ericdrosas87 Sep 19, 2023
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
18 changes: 18 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
EMAIL_FROM_ADDRESS=
EMAIL_REPLY_TO_ADDRESS=
EMAIL_SENDER_NAME=
EMAIL_HTML_EMAIL_TEMPLATE=

EMAIL_SMTP_HOST_NAME=
EMAIL_SMTP_PORT=

EMAIL_SMTP_USERNAME=
EMAIL_SMTP_PASSWORD=

FACEBOOK_APP_ID=
FACEBOOK_APP_SECRET=
FACEBOOK_APP_REDIRECT_URL=

GOOGLE_APP_ID=
GOOGLE_APP_SECRET=
GOOGLE_REDIRECT_URI=
21 changes: 0 additions & 21 deletions .env.sample

This file was deleted.

7 changes: 7 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
api/vendor
api/web/assets/
.DS_Store
log/access.log
log/error.log
.env
.idea
118 changes: 118 additions & 0 deletions .github/workflows/develop-pr-gae.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: 'Build Image on PR Creation ~ Optional: Deploy Preview Instances'

on:
pull_request:
types:
- 'opened'
- 'synchronize'
- 'reopened'
- 'closed'
branches:
- 'develop'

jobs:
build-image-no-deploy:
name: 'Build Image Without Deploy - No Preview'
runs-on: ubuntu-latest
if: ${{ (github.event.action != 'closed') && (startsWith(github.head_ref, 'preview') == false) }}

# Checkout the repository to the GitHub Actions runner
steps:
- name: Checkout
uses: actions/checkout@v2

# gcloud CLI setup
- name: Login to GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.DEV_SA_KEY }}
project_id: skyviewer
export_default_credentials: true

- name: Get secret to create .env
run: gcloud secrets versions access latest --secret=investigations-api-env > ./api/.env

- name: Setup docker build
uses: docker/setup-buildx-action@v2
id: buildx
with:
install: true

- name: Build client, but don't deploy
run: docker build .

build-push-deploy:
name: 'Build Image and Deploy Preview Version'
runs-on: ubuntu-latest
if: ${{ (github.event.action != 'closed') && (startsWith(github.head_ref, 'preview') == true) }}

# Checkout the repository to the GitHub Actions runner
steps:
- name: Checkout
uses: actions/checkout@v2

# gcloud CLI setup
- name: Login to GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.DEV_SA_KEY }}
project_id: skyviewer
export_default_credentials: true

- name: Get app.yaml
run: gcloud secrets versions access latest --secret=investigations-api-appyaml > app.yaml

- name: Format version name
id: version_name
run: echo "version_name=$(echo \"${{ github.head_ref }}\" | tr -cd '[:alnum:]' | tr '[:upper:]' '[:lower:]' | tr -d 'preview')" >> $GITHUB_ENV

- name: Deploy to App Engine
env:
BRANCH_NAME: ${{ env.version_name }}
run: |
gcloud app deploy app.yaml \
--no-promote \
--version=${BRANCH_NAME,,}

# Create or update a comment with the URL
- name: Find Comment
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: A preview of this PR

- name: Create or update a comment with the URL to the PR
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
A purreview of this PR will be available at https://${{ github.head_ref }}-dot-investigations-api-dot-skyviewer.uw.r.appspot.com until the request is closed. :cat2:
reactions: '+1'
edit-mode: replace

cleanup:
name: 'Cleanup PR Preview'
runs-on: ubuntu-latest
if: ${{ (github.event.action == 'closed') && (startsWith(github.head_ref, 'preview') == true) }}

# Checkout the repository to the GitHub Actions runner
steps:
- name: Checkout
uses: actions/checkout@v2

# gcloud CLI setup
- name: Login to GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.DEV_SA_KEY }}
project_id: skyviewer
export_default_credentials: true

# Destruct!
- name: Destroy version
env:
BRANCH_NAME: ${{ env.version_name }}
run: gcloud app versions delete ${BRANCH_NAME,,} --service=investigations-api
40 changes: 40 additions & 0 deletions .github/workflows/develop-push-gae.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'Push to Development after PR Merge'

on:
push:
branches:
- 'develop'

jobs:
build-push-deploy:
name: 'Deploy Development Version'
runs-on: ubuntu-latest
if: ${{ github.event.action != 'closed'}}

# Checkout the repository to the GitHub Actions runner
steps:
- name: Checkout
uses: actions/checkout@v2

# gcloud CLI setup
- name: Login to GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.DEV_SA_KEY }}
project_id: skyviewer
export_default_credentials: true

- name: Get app.yaml
run: gcloud secrets versions access latest --secret=investigations-api-appyaml > app.yaml

- name: Format version name
id: version_name
run: echo "version_name=$(echo \"${{ github.head_ref }}\" | sed 's/[_.,\/]/-/g' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV

- name: Deploy to App Engine
env:
BRANCH_NAME: ${{ env.version_name }}
run: |
gcloud app deploy app.yaml \
--promote

118 changes: 118 additions & 0 deletions .github/workflows/main-pr-gae.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: 'Build Image on PR Creation to Int ~ Optional: Deploy Preview Instances'

on:
pull_request:
types:
- 'opened'
- 'synchronize'
- 'reopened'
- 'closed'
branches:
- 'main'

jobs:
build-image-no-deploy:
name: 'Build Image Without Deploy - No Preview'
runs-on: ubuntu-latest
if: ${{ (github.event.action != 'closed') && (startsWith(github.head_ref, 'preview') == false) }}

# Checkout the repository to the GitHub Actions runner
steps:
- name: Checkout
uses: actions/checkout@v2

# gcloud CLI setup
- name: Login to GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.SKYVIEWER_INT_SERVICE_ACCOUNT }}
project_id: edc-int-6c5e
export_default_credentials: true

- name: Get secret to create .env
run: gcloud secrets versions access latest --secret=investigations-api-env > ./api/.env

- name: Setup docker build
uses: docker/setup-buildx-action@v2
id: buildx
with:
install: true

- name: Build client, but don't deploy
run: docker build .

build-push-deploy:
name: 'Build Image and Deploy Preview Version'
runs-on: ubuntu-latest
if: ${{ (github.event.action != 'closed') && (startsWith(github.head_ref, 'preview') == true) }}

# Checkout the repository to the GitHub Actions runner
steps:
- name: Checkout
uses: actions/checkout@v2

# gcloud CLI setup
- name: Login to GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.SKYVIEWER_INT_SERVICE_ACCOUNT }}
project_id: edc-int-6c5e
export_default_credentials: true

- name: Get app.yaml
run: gcloud secrets versions access latest --secret=investigations-api-appyaml > app.yaml

- name: Format version name
id: version_name
run: echo "version_name=$(echo \"${{ github.head_ref }}\" | tr -cd '[:alnum:]' | tr '[:upper:]' '[:lower:]' | tr -d 'preview')" >> $GITHUB_ENV

- name: Deploy to App Engine
env:
BRANCH_NAME: ${{ env.version_name }}
run: |
gcloud app deploy app.yaml \
--no-promote \
--version=${BRANCH_NAME,,}

# Create or update a comment with the URL
- name: Find Comment
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: A preview of this PR

- name: Create or update a comment with the URL to the PR
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
A purreview of this PR will be available at https://${{ github.head_ref }}-dot-investigations-api-dot-skyviewer.uw.r.appspot.com until the request is closed. :cat2:
reactions: '+1'
edit-mode: replace

cleanup:
name: 'Cleanup PR Preview'
runs-on: ubuntu-latest
if: ${{ (github.event.action == 'closed') && (startsWith(github.head_ref, 'preview') == true) }}

# Checkout the repository to the GitHub Actions runner
steps:
- name: Checkout
uses: actions/checkout@v2

# gcloud CLI setup
- name: Login to GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.SKYVIEWER_INT_SERVICE_ACCOUNT }}
project_id: edc-int-6c5e
export_default_credentials: true

# Destruct!
- name: Destroy version
env:
BRANCH_NAME: ${{ env.version_name }}
run: gcloud app versions delete ${BRANCH_NAME,,} --service=investigations-api
39 changes: 39 additions & 0 deletions .github/workflows/main-push-gae.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'Push to Development after PR Merge'

on:
push:
branches:
- 'main'

jobs:
build-push-deploy:
name: 'Deploy Development Version'
runs-on: ubuntu-latest
if: ${{ github.event.action != 'closed'}}

# Checkout the repository to the GitHub Actions runner
steps:
- name: Checkout
uses: actions/checkout@v2

# gcloud CLI setup
- name: Login to GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.SKYVIEWER_INT_SERVICE_ACCOUNT }}
project_id: edc-int-6c5e
export_default_credentials: true

- name: Get app.yaml
run: gcloud secrets versions access latest --secret=investigations-api-appyaml > app.yaml

- name: Format version name
id: version_name
run: echo "version_name=$(echo \"${{ github.head_ref }}\" | sed 's/[_.,\/]/-/g' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV

- name: Deploy to App Engine
env:
BRANCH_NAME: ${{ env.version_name }}
run: |
gcloud app deploy app.yaml \
--promote
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ api/web/assets/
log/access.log
log/error.log
.env
app.yaml
app.yaml
*.sql
docker-compose-local-db.yml
google-app-credentials.json
.idea
Loading
Loading