forked from GoogleContainerTools/distroless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
55 lines (45 loc) · 1.81 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
timeout: 2700s # 45 minutes
options:
machineType: N1_HIGHCPU_8
steps:
- name: gcr.io/cloud-marketplace-containers/google/bazel:3.4.1
env:
- PROJECT_ID=${PROJECT_ID}
- COMMIT_SHA=${COMMIT_SHA}
entrypoint: sh
args:
- -c
- |
#!/bin/sh
set -o errexit
set -o xtrace
# Make sure python points to python3
# perhaps the gcr.io/cloud-marketplace-containers/google/bazel image
# should be doing this though
update-alternatives --install /usr/bin/python python /usr/bin/python3 0
bazel build //package_manager:dpkg_parser.par
# Optional: trigger building package bundles without concurrency to avoid
# flakiness: https://github.com/GoogleContainerTools/distroless/issues/646
bazel build --jobs=1 @package_bundle_amd64_debian10//file:packages.bzl
bazel build --jobs=1 @package_bundle_arm_debian10//file:packages.bzl
bazel build --jobs=1 @package_bundle_arm64_debian10//file:packages.bzl
bazel build --jobs=1 @package_bundle_s390x_debian10//file:packages.bzl
bazel build --jobs=1 @package_bundle_ppc64le_debian10//file:packages.bzl
bazel build --jobs=1 @package_bundle_amd64_debian11//file:packages.bzl
bazel build --jobs=1 @package_bundle_arm_debian11//file:packages.bzl
bazel build --jobs=1 @package_bundle_arm64_debian11//file:packages.bzl
bazel build --jobs=1 @package_bundle_s390x_debian11//file:packages.bzl
bazel build --jobs=1 @package_bundle_ppc64le_debian11//file:packages.bzl
bazel run //:publish
- name: docker
env:
- PROJECT_ID=${PROJECT_ID}
- COMMIT_SHA=${COMMIT_SHA}
entrypoint: ./cloudbuild_docker.sh
- name: gcr.io/projectsigstore/cosign:v0.6.0@sha256:2303322158802ec0452758578ac80801a3754ee9cb19c128fc5d1b2ec32fa2d2
env:
- PROJECT_ID=${PROJECT_ID}
- COMMIT_SHA=${COMMIT_SHA}
entrypoint: sh
args:
- ./cloudbuild_cosign.sh