-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
28 lines (25 loc) · 852 Bytes
/
cloudbuild.yaml
File metadata and controls
28 lines (25 loc) · 852 Bytes
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
substitutions:
_KEY_NAME: "systera-api-env"
steps:
- id: 'extract-env'
name: 'gcr.io/cloud-builders/gcloud'
args: ['kms', 'decrypt', '--plaintext-file=.env', '--ciphertext-file=.env.enc', '--location=global', '--keyring=cloudbuild-secret', '--key=$_KEY_NAME']
- id: 'docker:build_and_push'
waitFor: ['extract-env']
name: 'gcr.io/cloud-builders/docker'
entrypoint: /bin/sh
args:
- -c
- docker build . -t gcr.io/startail-io/systera-api &&
docker push gcr.io/startail-io/systera-api
- id: 'maven:deploy'
waitFor: ['extract-env']
name: 'maven:3.6.0-jdk-8-slim'
entrypoint: /bin/bash
args:
- -c
- |
set -e
mkdir -p $$MAVEN_CONFIG
source .env && echo -n "$${CI_MVN_SETTINGS}" > $$MAVEN_CONFIG/settings.xml
bash ./systerapb/make-java.sh deploy