|
| 1 | +# clone main repository and all private submodules: |
| 2 | +# https://source.cloud.google.com/ |
| 3 | +# |
| 4 | +# create a trigger for main repository |
| 5 | +# https://console.cloud.google.com/cloud-build/triggers/add |
| 6 | +# add name (BuildDeploy) and description (Build & Deploy) |
| 7 | +# triggertyp: Tag |
| 8 | +# regex: ^release-.*$ |
| 9 | +# Build-Konfiguration: Cloud Build-Konfigurationsdatei |
| 10 | +# |
| 11 | +# activate App Engine Admin api |
| 12 | +# https://console.developers.google.com/apis/api/appengine.googleapis.com/overview |
| 13 | +# |
| 14 | +# allow AppEngine Deployment |
| 15 | +# https://console.cloud.google.com/cloud-build/settings |
| 16 | +# |
| 17 | +# |
| 18 | +# Make sure the projects cloudbuild service account has permission to download from |
| 19 | +# |
| 20 | +# Modify project Submodules |
| 21 | +# for public Repos: |
| 22 | +# use https urls |
| 23 | +# git config -f .gitmodules submodule.sources/less/ignite.url https://github.com/viur-framework/ignite.git |
| 24 | +# |
| 25 | + |
| 26 | +steps: |
| 27 | + # clone source code |
| 28 | + # if you need to reconfigure submodules to use https or git, do this here |
| 29 | + - name: 'gcr.io/cloud-builders/git' |
| 30 | + entrypoint: 'bash' |
| 31 | + args: |
| 32 | + - '-c' |
| 33 | + - | |
| 34 | + git config -f .gitmodules submodule.sources/less/ignite.url https://github.com/viur-framework/ignite.git |
| 35 | + git submodule update --init --recursive |
| 36 | +
|
| 37 | + # 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) |
| 38 | + - name: 'europe-west3-docker.pkg.dev/viur-build/viur-build-debian/viur-build:containerbuild-v0.10' |
| 39 | + entrypoint: bash |
| 40 | + args: |
| 41 | + - '-c' |
| 42 | + - | |
| 43 | + pipenv install --dev |
| 44 | + pipenv run viur build release |
| 45 | +
|
| 46 | + # deploy: use googles own gcloud container to deploy our build |
| 47 | + - name: 'gcr.io/cloud-builders/gcloud' |
| 48 | + args: ['app', 'deploy', './deploy/app.yaml', "--project=$PROJECT_ID", "--version=gcb-$SHORT_SHA-$_TAG_NAME", "--no-promote"] |
| 49 | +timeout: 6000s |
0 commit comments