Skip to content

Commit 4188d4b

Browse files
committed
Save cloudbuild config and update commit hooks.
[skip ci]
1 parent abe4a57 commit 4188d4b

File tree

2 files changed

+56
-5
lines changed

2 files changed

+56
-5
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v4.5.0
44
hooks:
55
- id: trailing-whitespace
66
- id: check-added-large-files
77
- id: check-ast
8-
- id: check-byte-order-marker
8+
- id: fix-byte-order-marker
99
- id: check-case-conflict
1010
- id: check-docstring-first
1111
- id: check-merge-conflict
1212
- id: detect-private-key
1313
- id: end-of-file-fixer
1414

1515
- repo: https://github.com/psf/black
16-
rev: 23.3.0
16+
rev: 23.10.0
1717
hooks:
1818
- id: black
1919

20-
- repo: https://github.com/charliermarsh/ruff-pre-commit
20+
- repo: https://github.com/astral-sh/ruff-pre-commit
2121
# Ruff version.
22-
rev: 'v0.0.263'
22+
rev: 'v0.1.0'
2323
hooks:
2424
- id: ruff

panel/cloudbuild.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
steps:
2+
- name: gcr.io/cloud-builders/docker
3+
env:
4+
- DOCKER_BUILDKIT=1
5+
args:
6+
- build
7+
- '--no-cache'
8+
- '-t'
9+
- >-
10+
$_AR_HOSTNAME/$PROJECT_ID/cloud-run-source-deploy/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA
11+
- .
12+
- '-f'
13+
- Dockerfile
14+
id: Build
15+
- name: gcr.io/cloud-builders/docker
16+
args:
17+
- push
18+
- >-
19+
$_AR_HOSTNAME/$PROJECT_ID/cloud-run-source-deploy/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA
20+
id: Push
21+
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:slim'
22+
args:
23+
- run
24+
- services
25+
- update
26+
- $_SERVICE_NAME
27+
- '--platform=managed'
28+
- >-
29+
--image=$_AR_HOSTNAME/$PROJECT_ID/cloud-run-source-deploy/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA
30+
- >-
31+
--labels=managed-by=gcp-cloud-build-deploy-cloud-run,commit-sha=$COMMIT_SHA,gcb-build-id=$BUILD_ID,gcb-trigger-id=$_TRIGGER_ID
32+
- '--region=$_DEPLOY_REGION'
33+
- '--quiet'
34+
id: Deploy
35+
entrypoint: gcloud
36+
images:
37+
- >-
38+
$_AR_HOSTNAME/$PROJECT_ID/cloud-run-source-deploy/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA
39+
options:
40+
substitutionOption: ALLOW_LOOSE
41+
logging: CLOUD_LOGGING_ONLY
42+
substitutions:
43+
_AR_HOSTNAME: europe-north1-docker.pkg.dev
44+
_TRIGGER_ID: 8ebd7eb7-1e16-4c90-a93d-ba76058df26d
45+
_PLATFORM: managed
46+
_SERVICE_NAME: simdec-panel
47+
_DEPLOY_REGION: europe-north1
48+
tags:
49+
- gcp-cloud-build-deploy-cloud-run
50+
- gcp-cloud-build-deploy-cloud-run-managed
51+
- simdec-panel

0 commit comments

Comments
 (0)