forked from GoogleCloudPlatform/layer-definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
86 lines (80 loc) · 3.27 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
timeout: "3600s"
options:
machineType: "N1_HIGHCPU_32"
steps:
# Install buildifier
- name: "gcr.io/asci-toolchain/nosla-ubuntu16_04-bazel-docker-gcloud"
entrypoint: "wget"
args:
- "-q"
- "https://github.com/bazelbuild/buildtools/releases/download/0.20.0/buildifier"
# Make the downloaded buildifier executable.
- name: "gcr.io/asci-toolchain/nosla-ubuntu16_04-bazel-docker-gcloud"
entrypoint: "chmod"
args:
- "+x"
- "buildifier"
id: "buildifier-enable"
# Run buildifier --mode=check.
- name: "gcr.io/asci-toolchain/nosla-ubuntu16_04-bazel-docker-gcloud"
entrypoint: "bash"
args:
- "-c"
- "/workspace/buildifier --mode=check $(find . -name BUILD -o -name WORKSPACE -o -name '*.bzl' -type f)"
waitFor: ["buildifier-enable"]
# Run buildifier --lint=warn.
- name: "gcr.io/asci-toolchain/nosla-ubuntu16_04-bazel-docker-gcloud"
entrypoint: "bash"
args:
- "-c"
- "/workspace/buildifier --lint=warn $(find . -name BUILD -o -name WORKSPACE -o -name '*.bzl' -type f)"
waitFor: ["buildifier-enable"]
- name: "gcr.io/asci-toolchain/nosla-ubuntu16_04-bazel-docker-gcloud"
entrypoint: "bazel"
args:
- "--output_base=/workspace"
- "test"
- "--remote_instance_name=projects/asci-toolchain/instances/default_instance"
- "--crosstool_top=@rbe_toolchain_config//cc:toolchain"
- "--host_javabase=@rbe_toolchain_config//java:jdk"
- "--javabase=@rbe_toolchain_config//java:jdk"
- "--extra_toolchains=@rbe_toolchain_config//config:cc-toolchain"
- "--extra_execution_platforms=//:platform_docker"
- "--host_platform=//:platform_docker"
- "--platforms=//:platform_docker"
- "--action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1"
- "--host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8"
- "--java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8"
- "--spawn_strategy=remote"
- "--strategy=Javac=remote"
- "--strategy=Closure=remote"
# This ensures the "security_check" rule in
# @io_bazel_rules_docker//docker/security:security_check.bzl is executed
# locally. It runs gcloud under the hood which won't work on RBE.
- "--strategy=ImageSecurityCheck=local"
# Run the config test locally because it runs docker which needs to pull
# image and the credentials to do this aren't available on the remote
# machines.
- "--strategy_regexp=//:configs_test=local"
- "--genrule_strategy=remote"
- "--define=EXECUTOR=remote"
- "--remote_cache=remotebuildexecution.googleapis.com"
- "--remote_executor=remotebuildexecution.googleapis.com"
- "--remote_timeout=3600"
- "--auth_enabled=true"
- "--test_output=errors"
- "--host_force_python=PY2"
- "//layers/..."