-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
48 lines (40 loc) · 1.71 KB
/
cloudbuild.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# clone main repository and all private submodules:
# https://source.cloud.google.com/
#
# create a trigger for main repository
# https://console.cloud.google.com/cloud-build/triggers/add
# add name (BuildDeploy) and description (Build & Deploy)
# activate App Engine Admin API
# https://console.developers.google.com/apis/api/appengine.googleapis.com/overview
#
# allow App Engine Deployment
# https://console.cloud.google.com/cloud-build/settings
# Make sure the projects cloudbuild service account has permission to download from
# Modify project Submodules
# for public Repos:
# use https urls
# git config -f .gitmodules submodule.sources/less/ignite.url https://github.com/viur-framework/viur-ignite.git
steps:
# clone source code
# if you need to reconfigure submodules to use https or git, do this here
- name: 'gcr.io/cloud-builders/git'
entrypoint: 'bash'
args:
- '-c'
- |
git config -f .gitmodules submodule.sources/less/ignite.url https://github.com/viur-framework/viur-ignite.git
git submodule update --init --recursive
# buildTasks: we are using our new alpine container which includes a pyenv install so we can use viur-cli/flare with a fixed python version (3.9.5)
- name: 'europe-west3-docker.pkg.dev/viur-build/viur-build-debian/viur-build:containerbuild-v0.10'
entrypoint: bash
args:
- '-c'
- |
pipenv install --dev
pipenv run viur build release
# deploy: use googles own gcloud container to deploy our build
- name: 'gcr.io/cloud-builders/gcloud'
args: ['app', 'deploy', './deploy/app.yaml', "--project=$PROJECT_ID", "--version=gcb-$SHORT_SHA-$_TAG_NAME", "--no-promote"]
options:
logging: CLOUD_LOGGING_ONLY
timeout: 6000s