Skip to content
This repository was archived by the owner on Sep 23, 2024. It is now read-only.

Commit df0be74

Browse files
authored
Merge pull request #272 from FIRST-Tech-Challenge/pr_separate_app_engine
Reduced time for deploying to app engine
2 parents 7af2d57 + c833fd3 commit df0be74

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+712
-448
lines changed

.github/workflows/prod-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Write Properties
3030
run: |
3131
sha=$(git rev-list --tags --max-count=1)
32-
echo "{ \"version\" : \"$(git describe --tags $sha)\" }" > server/app.properties
32+
echo "{ \"version\" : \"$(git describe --tags $sha)\" }" > server/app_engine/app.properties
3333
3434
- name: Closure Build
3535
run: ./gradlew compileJavascript
@@ -81,7 +81,7 @@ jobs:
8181
- name: Write Properties
8282
run: |
8383
sha=$(git rev-list --tags --max-count=1)
84-
echo "{ \"version\" : \"$(git describe --tags $sha)\" }" > server/app.properties
84+
echo "{ \"version\" : \"$(git describe --tags $sha)\" }" > server/app_engine/app.properties
8585
8686
- name: Closure Build
8787
run: ./gradlew compileJavascript

.github/workflows/terraform.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
3030
- name: Write Properties
3131
run: |
32-
echo "{ \"version\" : \"$(git rev-parse --short $GITHUB_SHA) \" }" > server/app.properties
32+
echo "{ \"version\" : \"$(git rev-parse --short $GITHUB_SHA) \" }" > server/app_engine/app.properties
3333
3434
- name: Closure Build
3535
run: ./gradlew compileJavascript

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.index_updated
22
__pycache__/
33
compiled/*
4-
env_variables.yaml
54
flask_secret_key.txt
65
client_secrets.json
76
key.json

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ gcloud auth configure-docker
173173
Do you want to continue (Y/n)? y
174174
```
175175
176-
## Fill in the values in server/env_variables.yaml
176+
## Fill in the values in server/app_engine/env_variables.yaml
177177
178178
1. Replace `<YOUR-PROJECT-ID>` with the Google Cloud Project ID for your project.
179179
1. Replace `<YOUR-ORIGIN>` with the base URL that will serve the website.
@@ -185,11 +185,11 @@ Do you want to continue (Y/n)? y
185185
The following command will set the version of fmltc displayed to the user to the current git commit hash.
186186
187187
```
188-
echo "{ \"version\": \"$(git rev-parse --short HEAD)\" }" > server/app.properties
188+
echo "{ \"version\": \"$(git rev-parse --short HEAD)\" }" > server/app_engine/app.properties
189189
```
190190
If you wish the version to be set to something other than the current git commit hash you can use the following code replacing `<VERSION_NAME>` with the desired name of your version
191191
```
192-
echo "{ \"version\": \"<VERSION_NAME>\" }" > server/app.properties
192+
echo "{ \"version\": \"<VERSION_NAME>\" }" > server/app_engine/app.properties
193193
```
194194
195195
## Setup the environment.
@@ -209,7 +209,7 @@ source env_setup.sh
209209
scripts/deploy_indexes.sh
210210
```
211211
212-
1. Deploy the static content (the CSS styles and the favicon).
212+
1. Deploy the static content.
213213
```
214214
source env_setup.sh
215215
scripts/deploy_static.sh

scripts/deploy_cloud_function.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ fi
66

77
pushd server
88
gcloud functions deploy perform_action \
9+
--ignore-file=.cloud_function_ignore \
910
--runtime=python39 \
10-
--set-env-vars PROJECT_ID=${FMLTC_GCLOUD_PROJECT_ID} \
11+
--set-env-vars=PROJECT_ID=${FMLTC_GCLOUD_PROJECT_ID} \
1112
--memory=8192MB \
1213
--timeout=540 \
1314
--trigger-resource=${FMLTC_GCLOUD_PROJECT_ID}-action-parameters \

scripts/deploy_gae.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ if [[ "${FMLTC_GCLOUD_PROJECT_ID}" == "" ]]; then
44
fi
55

66

7-
pushd server
8-
gcloud -q app deploy --version v1
9-
popd
7+
pushd server/app_engine
8+
gcloud -q app deploy \
9+
--ignore-file=.app_engine_ignore \
10+
--appyaml=app.yaml \
11+
--version v1
12+
popd

server/.cloud_function_ignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.cloud_function_ignore
2+
client_secrets.json
3+
flask_secret_key.txt
4+
key.json
5+
teams
6+
7+
__pycache__/
8+
app_engine/.app_engine_ignore
9+
app_engine/announcements.py
10+
app_engine/app.yaml
11+
app_engine/app_engine.py
12+
app_engine/config.py
13+
app_engine/credentialstore.py
14+
app_engine/dataset_producer.py
15+
app_engine/dataset_zipper.py
16+
app_engine/env_variables.yaml
17+
app_engine/oidc.py
18+
app_engine/requirements.txt
19+
app_engine/roles.py
20+
app_engine/team_info.py
21+
app_engine/test_routes.py
22+
app_engine/tracking.py
23+
app_engine/wrappers.py
24+
src/
25+
static/
26+
templates/

server/.gcloudignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
.git
1111
.gitignore
1212
.index_updated
13-
env_variables.yaml
13+
app_engine/env_variables.yaml
1414
flask_secret_key.txt
1515
client_secrets.json
1616
key.json
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
app.yaml
2+
env_variables.yaml
3+
4+
__pycache__/
File renamed without changes.

0 commit comments

Comments
 (0)