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

Commit

Permalink
Check in dev Cloud Build config.
Browse files Browse the repository at this point in the history
  • Loading branch information
xSAVIKx committed Sep 30, 2021
1 parent 5398474 commit 4c842a3
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions cloudbuild-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
steps:
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk:slim"
id: "setup-envs"
entrypoint: "bash"
args:
- "-c"
- |
printf "%s" "$$APP_ENGINE_ENVS" > ./env.sh
printf "%s" "$$DJANGO_STORAGES_GCS_KEY" > ./django-storages-gcs-key.json
chmod +x ./env.sh
secretEnv: ["APP_ENGINE_ENVS", "DJANGO_STORAGES_GCS_KEY"]
waitFor: ["-"]
- name: "python:3.8-slim-buster"
id: "install-deps"
entrypoint: "python3"
args: ["-m", "pip", "install", "-r", "requirements.txt", "--user"]
waitFor: [ "-" ]
- name: "python:3.8-slim-buster"
id: "collect-statics"
entrypoint: "bash"
args:
- "-c"
- |
source ./env.sh
python3 ./manage.py collectstatic --noinput
waitFor: ["setup-envs", "install-deps"]

- name: "gcr.io/google.com/cloudsdktool/cloud-sdk:slim"
id: "deploy"
entrypoint: "bash"
args:
- "-c"
- |
source ./env.sh
gcloud app deploy
waitFor: ["collect-statics"]

#substitutions:
# _SQL_DB: ""
availableSecrets:
secretManager:
- versionName: "projects/anth-ja77-lc-dev-42d5/secrets/APP_ENGINE_ENVS/versions/latest"
env: "APP_ENGINE_ENVS"
- versionName: "projects/anth-ja77-lc-dev-42d5/secrets/django-storages-gcs-key/versions/latest"
env: "DJANGO_STORAGES_GCS_KEY"

0 comments on commit 4c842a3

Please sign in to comment.