Commit c49f40c
authored
feat(ci): Implement CI/CD pipeline for parallel Ubuntu Docker builds (#4952)
This PR establishes a robust CI/CD pipeline for building and publishing
Docker images, addressing the requirements of the Ubuntu 24.04
migration. The new system introduces separate, parallel build workflows
for Pull Requests and merges to the master branch.
Part of: [b/441792502](b/441792502)
***
### Key Changes
- **New CI/CD Workflow:** Implemented a two-stage pipeline for Docker
image builds:
1. **Pull Request Verification:** A new trigger, `Build-Base-Images-PR`,
automatically runs on PRs that modify files in the `docker/` directory.
It performs a parallel, **build-only** check for all Ubuntu versions to
validate the Dockerfiles. The success of this build is required for
merging.
2. **Master Branch Deployment:** A second new trigger,
`Build-And-Push-Base-Images-Master`, runs upon merging to `master`. It
executes the same parallel build process but also **pushes** the tagged
images to the Artifact Registry.
- **Parallel Execution:** The `docker/cloudbuild.yaml` configuration was
updated to run the builds for `latest`, `ubuntu-20-04`, and
`ubuntu-24-04` simultaneously, significantly reducing pipeline execution
time.
- **Conditional Push Logic:** The `docker/build.sh` script was
refactored to accept a `--no-push` flag, allowing the CI pipeline to
control whether images are only built (for PRs) or built and pushed (for
master).
***
### How to Verify
1. **Pull Request:** Observe that the `Build-Base-Images-PR` check has
run and passed on this PR, as it contains changes in the `docker/`
directory.
2. **Master Branch:** After this PR is merged, the
`Build-And-Push-Base-Images-Master` trigger will be active. To verify
its functionality, a subsequent PR that modifies a file in `docker/` can
be merged. The Cloud Build dashboard for the `clusterfuzz-images`
project should then show this trigger running and successfully pushing
the images.1 parent 87bfaea commit c49f40c
File tree
7 files changed
+314
-186
lines changed- docker
- base
- chromium/base
7 files changed
+314
-186
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
8 | 19 | | |
9 | 20 | | |
10 | | - | |
| 21 | + | |
11 | 22 | | |
12 | 23 | | |
13 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
14 | 34 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
18 | 39 | | |
19 | | - | |
| 40 | + | |
20 | 41 | | |
21 | | - | |
| 42 | + | |
22 | 43 | | |
23 | | - | |
| 44 | + | |
24 | 45 | | |
25 | 46 | | |
26 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
27 | 50 | | |
28 | 51 | | |
29 | | - | |
30 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
31 | 59 | | |
32 | 60 | | |
33 | 61 | | |
| |||
79 | 107 | | |
80 | 108 | | |
81 | 109 | | |
82 | | - | |
| 110 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 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 | + | |
38 | 68 | | |
39 | 69 | | |
40 | | - | |
41 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
42 | 76 | | |
43 | 77 | | |
44 | 78 | | |
| |||
60 | 94 | | |
61 | 95 | | |
62 | 96 | | |
63 | | - | |
| 97 | + | |
64 | 98 | | |
65 | 99 | | |
66 | 100 | | |
| |||
71 | 105 | | |
72 | 106 | | |
73 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
74 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
75 | 123 | | |
76 | 124 | | |
77 | 125 | | |
78 | 126 | | |
79 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
| 29 | + | |
26 | 30 | | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
| 40 | + | |
34 | 41 | | |
| 42 | + | |
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | | - | |
| 51 | + | |
43 | 52 | | |
0 commit comments