forked from ForgeRock/forgeops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
62 lines (62 loc) · 2.34 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Google Cloud builder steps to build our helm charts and docker images on gcr.io.
# options:
# machineType: 'N1_HIGHCPU_8'
timeout: 3500s
steps:
# Get the helm command.
- name: gcr.io/cloud-builders/wget
args: ['-O', 'helm.tar.gz', 'https://storage.googleapis.com/kubernetes-helm/helm-v2.9.0-linux-amd64.tar.gz']
# Build helm charts and push to gs bucket.
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: ./etc/cloud-build-push-charts.sh
- name: 'gcr.io/cloud-builders/wget'
# Run dl.sh download script with options to use wget (-w).
entrypoint: './dl.sh'
# -w - use wget instead of curl. We may want to use -s for snapshots..
args: ['-w']
dir: 'docker'
env:
# - 'BUILD_ID=$BUILD_ID'
# - 'PROJECT=$PROJECT_ID'
# - 'REV=$REVISION_ID'
# - 'BRANCH_NAME=$BRANCH_NAME'
# - 'REPO_NAME=$REPO_NAME'
# - 'TAG_NAME=$TAG_NAME'
# Set _API_KEY in the cloudbuild
# console https://console.cloud.google.com/gcr/triggers?project=engineering-devops
# This is the credential to pull product binaries from the ForgeRock Artifactory repository.
- 'API_KEY=${_ARTIFACTORY_API_KEY}'
# build gcr.io
- name: 'gcr.io/cloud-builders/docker'
dir: 'docker'
entrypoint: './build.sh'
#args: ['-g','-c', 'gcr.io/engineering/devops' ]
args: ['-g']
# TODO: Make the bintray push a separate cloudbuild job.
- name: 'gcr.io/cloud-builders/docker'
dir: 'docker'
# Run the script to build the docker images with options -a (authenticate) and -p (push)
entrypoint: './build.sh'
args: ['-a', '-p']
env:
# Set _DOCKER_USERNAME and _DOCKER_PASSWORD in the cloudbuild
# console https://console.cloud.google.com/gcr/triggers?project=engineering-devops
# These are the credentials needed to push images to your private docker registry.
- 'DOCKER_USER=${_DOCKER_USER}'
- 'DOCKER_PASSWORD=${_DOCKER_PASSWORD}'
# Launch the smoke test
- name: gcr.io/cloud-builders/gcloud
args: ['container','builds','submit', '--config', 'cloudbuild-smoketests.yaml', '--async', '--substitutions', '_SLACK_SERVICE=${_SLACK_SERVICE}', '.']
images:
- 'gcr.io/$PROJECT_ID/ds'
- 'gcr.io/$PROJECT_ID/openidm'
- 'gcr.io/$PROJECT_ID/openig'
- 'gcr.io/$PROJECT_ID/openam'
- 'gcr.io/$PROJECT_ID/amster'
- 'gcr.io/$PROJECT_ID/util'
- 'gcr.io/$PROJECT_ID/java'
- 'gcr.io/$PROJECT_ID/git'
- 'gcr.io/$PROJECT_ID/gatling'
- 'gcr.io/$PROJECT_ID/nginx-agent'
- 'gcr.io/$PROJECT_ID/apache-agent'
tags: ['build']